An offline IPv4 CIDR and subnet calculator. Enter an address with a prefix or a dotted mask and get the network and broadcast addresses, the usable host range, subnet and wildcard masks, address counts, and whether the block is private or public.

How to use it

  • Enter an address in CIDR form such as 192.168.10.37/24, or supply a dotted mask.
  • Read off the network address, broadcast address and the first and last usable host.
  • Use the wildcard mask when writing access-control lists on Cisco-style equipment.
  • Check the classification line to see whether the block is RFC 1918 private space or publicly routable.

How prefixes divide the address space

An IPv4 address is 32 bits. The prefix length states how many leading bits identify the network, leaving the remainder for hosts. A /24 fixes 24 network bits and leaves 8 host bits, giving 256 addresses of which 254 are assignable, because the all-zeros host is the network identifier and the all-ones host is the directed broadcast. Every bit you add to the prefix halves the block: a /25 yields 128 addresses, a /26 yields 64, and so on.

The subnet mask expresses the same information as a dotted quad, so /24 is 255.255.255.0. The wildcard mask is its bitwise inverse, 0.0.0.255, and appears in ACLs and OSPF configuration because those parsers match on the bits set to zero. Getting the two confused is one of the most common causes of a rule that silently matches nothing or, worse, everything.

The /31 and /32 exceptions

The rule that two addresses are unusable breaks down at the edges. A /32 describes a single host, typically a loopback or a route to one machine. A /31, standardised in RFC 3021, is used for point-to-point links where both addresses are assignable because a broadcast address is meaningless with only two endpoints. This calculator reports both correctly rather than showing a nonsensical negative host count. Private ranges to recognise are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, plus 169.254.0.0/16 for link-local autoconfiguration and 127.0.0.0/8 for loopback.

Frequently asked questions

Why does my /24 show 254 usable hosts rather than 256?

The first address in the block identifies the network itself and the last is the broadcast address for that network. Neither can be assigned to an interface, so a /24 offers 254 assignable addresses. The tool shows both the total and the usable count so the difference is explicit.

What is the fastest way to split a network in half?

Add one to the prefix length. A /24 becomes two /25 blocks, the first starting at the original network address and the second starting halfway through. Repeat to divide further; each additional bit doubles the number of subnets and halves their size.

Does this send my addressing to a server?

No. All arithmetic happens in your browser, so internal addressing schemes you are planning never leave your machine, which matters when the layout itself is sensitive.

Related tools: Hex / Binary Converter, URL Scanner, CVSS Calculator.