CIDR & Subnet Calculator
Calculate IPv4 subnet ranges, network/broadcast addresses, usable host counts, and CIDR notation. Runs in your browser.
Runs entirely in your browser. Nothing is sent to our servers.
About CIDR
CIDR (Classless Inter-Domain Routing) notation expresses an IP network as
an address plus a prefix length: 192.168.1.0/24 means
"addresses where the first 24 bits match 192.168.1.0". The
prefix tells you how many bits are network and how many are host.
What this calculator returns
- Network address — the first address in the block (host bits all zero).
- Broadcast address — the last address in the block (host bits all one).
- Usable host range — the addresses you can assign to devices, excluding the network and broadcast addresses for prefixes shorter than /31.
- Subnet mask — the dotted decimal mask
equivalent, e.g.
255.255.255.0for /24. - Wildcard mask — the inverse of the subnet mask, used by Cisco ACLs.
- Total / usable count — how big the block is.
/31 and /32 are special
Traditionally the network address and broadcast address are reserved,
leaving 2^h − 2 usable hosts. But RFC 3021 lets /31 networks
use both addresses as point-to-point endpoints, giving 2 usable hosts.
And /32 is a single address — useful for host routes and loopbacks.
Frequently asked questions
- Does this handle IPv6?
- Not in this version — it's IPv4 only. IPv6 subnet math is similar in concept but with 128-bit addresses; a v6 calculator is on the planned list.
- Why does /24 give 254 usable hosts instead of 256?
- A /24 block contains 256 addresses, but two of them are reserved: the network address (all host bits 0) and the broadcast address (all host bits 1). Most hosts can't use those.
- What's the difference between a subnet mask and a wildcard mask?
- They're inverses.
255.255.255.0is the subnet mask for /24;0.0.0.255is the corresponding wildcard mask. Cisco ACLs use wildcard masks; almost everything else uses subnet masks. - Can I paste a non-network address (like a host) and get the network it belongs to?
- Yes — the calculator masks off the host bits automatically. Paste
192.168.1.42/24and you'll see the same network as192.168.1.0/24.
Last updated: May 17, 2026