IPv4 · IPv6 · CIDR

CIDR and subnet calculator

Network, broadcast, host range and address count for any IPv4 or IPv6 block — computed with exact integers, not rounded floats.

/24 on IPv4 · 256 addresses in the block

The guided form is IPv4-shaped. For an IPv6 block, switch to the typed field — the prefix slider follows the address family, up to /128.

Answers whether it is inside the block above.

The calculation happens in this tab. No address you type is sent anywhere.

Short answer: type the block, read the table. Every number is exact: IPv6 counts use BigInt, so a /64 reports 18,446,744,073,709,551,616 addresses rather than 1.8446744e19.

The arithmetic, in one line

A block is an address and a mask: network = address AND mask, andbroadcast = network OR NOT mask (IPv4 only). Everything else follows from counting, which is why the host count is 2^(bits − prefix) minus two when the block is big enough to have a broadcast address.

Common prefix lengths

Need to lay the results out for a change ticket or README? TheMarkdown table generator turns them into a table without hand-aligning pipes.

Subnet questions

Why does a /24 have 254 usable hosts and not 256?

The block holds 256 addresses. The first is the network address and the last is the broadcast address, and neither can be assigned to a host — so 254 remain. The two exceptions are a /31, where both addresses are usable on a point-to-point link (RFC 3021), and a /32, which is one host.

How many addresses are in an IPv6 /64?

2^64, which is 18,446,744,073,709,551,616 — about 18 quintillion. That number is why this calculator uses BigInt rather than floating point: a double cannot hold it exactly, and a subnet tool that rounds an address is worse than no tool.

Does IPv6 have a broadcast address?

No. IPv6 uses multicast instead, so every address inside a block is a real address. The page says so rather than printing a broadcast field, and it notes the subnet-router anycast address at the bottom of each subnet.

What do the scope labels mean?

They come from the IANA special-purpose registries: private ranges (10/8, 172.16/12, 192.168/16), loopback (127/8, ::1), link-local (169.254/16, fe80::/10), carrier-grade NAT (100.64/10), unique local (fc00::/7), multicast and reserved. A label describes the block, not how it is routed on your network.

Can I check whether an address is inside a block?

Yes — type it in the second field and the page answers with a pass/fail badge. Both values must be the same IP version; an IPv4 address cannot be inside an IPv6 block, and the tool says that instead of returning a misleading "not found".

Related tools