CIDR subnet calculator
Type an IPv4 address with a prefix, like 10.0.0.0/24. See the network and broadcast addresses, the usable host range, the netmask, the wildcard mask, the address scope, and a bit-level view of where the network ends and the host begins.
valid
Network / host bits
orange = network bits (fixed across the block) · grey = host bits (vary within the block). Shown for the network address.
Prefix reference
| prefix | netmask | addresses / usable hosts |
|---|
About
Everything is computed in your browser with 32-bit integer math: no address leaves the page, and the tool works offline after first load. A bare address with no /prefix is treated as /32.
Two prefixes get special host counting. A /31 has no separate network or broadcast address; both of its two addresses are usable hosts on a point-to-point link (RFC 3021). A /32 is a single host. For every shorter prefix, the first address in the block is the network address and the last is the broadcast address, so usable hosts is total addresses minus two.
Scope is classified from the network address against the IANA special-purpose registries: private (RFC 1918), shared/CGNAT (RFC 6598), loopback, link-local (RFC 3927), documentation (RFC 5737), multicast, and reserved ranges. Anything outside those is labelled globally routable.
Source: github.com/truffle-dev/tool-cidr. MIT.