CIDR calculator
Enter a CIDR range and get the network and broadcast address, the first and last host and the number of hosts.
203.0.113.0/24 covers 256 addresses
The details
Calculated in your browserNext
What the CIDR calculator does
Enter a range in CIDR notation, like 192.168.10.0/24 or 2001:db8::/48. The calculator shows the network address, the first and last address, the broadcast address for IPv4, the netmask and wildcard mask, and how many addresses the range holds. It runs in your browser.
How CIDR works
The number after the slash is how many leading bits are fixed. An IPv4 /24 fixes 24 of 32 bits and leaves 8, so it holds 2 to the 8th, which is 256 addresses. Each step down doubles the size: a /23 holds 512 and a /22 holds 1,024.
In a normal IPv4 subnet the first address names the network and the last is the broadcast address, so a /24 has 254 usable hosts. /31 and /32 are the exceptions. RFC 3021 allows both addresses of a /31 on point-to-point links, and a /32 is a single host.
When you need it
- Writing SPF ip4 and ip6 entries. ip4:203.0.113.0/24 covers 256 addresses and costs no DNS lookup.
- Reading a provider's published IP ranges or a DMARC report source.
- Setting firewall rules and allowlists.
- Planning subnets for a network.
Why it matters for cold email
SPF flattening turns includes into ip4 and ip6 ranges written in CIDR. Get a prefix length wrong and you either leave out real sending servers, so their mail fails SPF, or you authorize a far bigger block than you meant to, so strangers' servers can pass as you. Check every range before it goes into a record.