CIDR Calculator
Network, broadcast, mask and usable range for any block — and split it into subnets.
Enter a block on the left.
How it works
A prefix length says how many leading bits of an address are fixed. Everything after them varies, and that remainder is the block. Which makes almost every question about a subnet the same question asked twice: where does it start, and how far does it run.
Two reserved addresses, except when there are not
An IPv4 block normally loses its first address to the network identifier and its last to broadcast, so a /24
offers 254 hosts rather than 256. The formula that encodes this — 2ⁿ − 2 — gives the wrong answer
twice at the bottom of the range, and both cases are ones you actually meet. A /31 has two
addresses and no room for either reservation; RFC 3021 makes both ends assignable, which is why point-to-point
links use it. A /32 is a single host route, so it has one usable address, rather than the
2⁰ − 2 = −1 the formula produces. Both are handled here as the RFCs define them.
IPv6 reserves nothing
There is no broadcast address in IPv6 — the concept was removed from the family and its work given to multicast groups. So no broadcast row appears for a v6 prefix, because printing one would be inventing a field, and every address in the prefix counts as usable.
Counting is exact
A /64 holds 18,446,744,073,709,551,616 addresses. A JavaScript number stops being exact above 253 − 1, so anything that computes this as a float is already rounding by the time it prints. The arithmetic here runs on arbitrary-precision integers throughout.
Host bits are cleared, and reported
192.0.2.5/24 is how an interface address is written, so it is accepted — and reported as
192.0.2.0/24 with a note that host bits were set. Rejecting it would be unhelpful; changing it in
silence would leave you reading an answer about a different block than the one you pasted.
Working with an IPv4 address and a dotted subnet mask instead? The
IP Subnet Calculator takes 192.168.1.10 255.255.255.0 as
typed, shows the binary split and address class, divides a subnet into a given number of pieces, and carries a /0
to /32 mask reference table.
Example
10.0.0.0/8 describes 16,777,216 addresses with 16,777,214 usable, mask
255.0.0.0. Switch to split mode at /12 and it becomes 16 subnets beginning
10.0.0.0/12, 10.16.0.0/12, 10.32.0.0/12. Ask for /30 instead
and the total reads 4,194,304 — the list is capped, and says so, rather than rendering four million rows.
Frequently asked questions
Why does a /31 show two usable addresses instead of none?
Because RFC 3021 says so. The usual formula subtracts a network and a broadcast address from every block, which leaves a /31 with zero usable hosts — yet /31s are used on point-to-point links every day. On a link with exactly two addresses there is nobody to broadcast to, so both ends are assignable. A /32 is handled the same way: it is a single host route, so it has one usable address, not minus one.
Why is there no broadcast address for an IPv6 block?
IPv6 has no broadcast. The concept was removed from the family and its jobs were given to multicast groups, so a tool that prints a "broadcast address" for a v6 prefix is inventing a field. Nor does IPv6 reserve either end of a prefix, which is why every address in a v6 block counts as usable here while a v4 block loses two.
What happens if I enter 192.0.2.5/24 rather than the network address?
It is accepted and reported as 192.0.2.0/24, with a note that host bits were set. That form is how an interface address is conventionally written, so rejecting it would be unhelpful — but quietly changing the input without saying so would leave you reading an answer about a different block than the one you pasted.
Can it handle a /8 split into /30s?
It will calculate it, but it will not list four million rows. The subnet list is capped and the true total is reported alongside it, so you can see the count is 4,194,304 without the tab freezing while it renders them.
Related tools
IP Subnet Calculator
Enter an IPv4 address with a prefix or subnet mask, see the whole subnet, and divide it.
LocalCIDR Range Calculator
Convert between a start-end IP range and the CIDR blocks covering it.
LocalCIDR Overlap Checker
Find which blocks in a list overlap, contain or duplicate each other.
LocalIP Address Converter
Every representation of an address at once — dotted, binary, integer and hex.
LocalPrivate & Public IP Classifier
Tell whether an address is routable, private, loopback or otherwise reserved.
LocalIPv6 Calculator
Expand, compress and inspect an IPv6 address or prefix.
Local