Subnet Calculator

Enter an IPv4 address and a prefix length to see the subnet it belongs to: network and broadcast addresses, the usable host range, masks and the number of hosts.

/24 = 255.255.255.0
Results update as you type.

Network

192.168.10.0/24

254 usable hosts

Subnet mask
255.255.255.0
Usable host range
192.168.10.1 – 192.168.10.254
Broadcast
192.168.10.255
Wildcard mask
0.0.0.255
Total addresses
256
Address type
Class C, private

About this calculator

Useful for configuring routers, servers, firewalls and cloud networks.

How to use it

  1. Enter the IP address.
  2. Enter the prefix length.
  3. Read the subnet details.

The formula

Network = IP AND mask; broadcast = network OR wildcard; hosts = 232 − prefix − 2
prefix
number of network bits, such as /24
wildcard
inverse of the subnet mask

Worked example

192.168.10.37/24

  1. Network 192.168.10.0, broadcast 192.168.10.255.
  2. Usable hosts 192.168.10.1 to 192.168.10.254: 254 hosts.
  3. Mask 255.255.255.0, wildcard 0.0.0.255; class C, private.

What the result means

/31 and /32 are special: point-to-point links and single hosts.

The four /26 subnets inside 192.168.10.0/24

Change the prefix on the example address from /24 to /26 and the same /24 splits into four networks of 64 addresses. Each row below is what the calculator shows for an address in that quarter.

192.168.10.0/24 divided into /26 blocks
NetworkFirst usableLast usableBroadcast
192.168.10.0/26192.168.10.1192.168.10.62192.168.10.63
192.168.10.64/26192.168.10.65192.168.10.126192.168.10.127
192.168.10.128/26192.168.10.129192.168.10.190192.168.10.191
192.168.10.192/26192.168.10.193192.168.10.254192.168.10.255

Example: a larger block that does not end on .0

Enter 10.20.37.200 with prefix 21. A /21 mask is 255.255.248.0, so the third octet steps in eights: 32, 40, 48 and so on. 37 falls in the block starting at 32, giving network 10.20.32.0/21, usable hosts 10.20.32.1 to 10.20.39.254, broadcast 10.20.39.255 and 2,046 usable hosts. So 10.20.38.0 is an ordinary host address here, even though it ends in 0.

For a /30 link between two routers, 203.0.113.9/30 gives network 203.0.113.8, hosts .9 and .10, and broadcast .11.

Checks before you configure a device

  • Two devices talk directly only if they have the same network address with the same mask. 192.168.10.70/26 and 192.168.10.130/26 are in different subnets, so traffic between them must go through a router.
  • Do not assign the network or broadcast address to a device.
  • The gateway is often the first usable address, but that is a habit, not a rule.

Assumptions

  • IPv4 only.

Limitations

  • IPv6 subnets are not covered.

Frequently asked questions

How many hosts in a /24?

254 usable addresses.

What is a wildcard mask?

The inverse of the subnet mask, used in ACLs.

Is 192.168.x.x private?

Yes, it is a private range for local networks.

How do I know if two IP addresses are on the same subnet?

Enter each address with the same prefix. If the calculator shows the same network address for both, they are on the same subnet.

Why does a /31 show no broadcast address?

A /31 is used for point-to-point links with exactly two ends, so both addresses are usable and no broadcast address is needed.

Can an address ending in .0 or .255 be a host?

Yes, in subnets larger than a /24. In 10.20.32.0/21, for example, 10.20.33.255 and 10.20.34.0 are both ordinary host addresses.

Last reviewed on 12 October 2026. How we calculate and check. Found a mistake? Tell us.