Development Tools
Subnet and CIDR Calculator
Enter an IPv4 or IPv6 address with a prefix length, or an IPv4 address with a subnet mask, and see the network address, mask, wildcard mask, first and last address, usable host range and total addresses. Split a block into smaller subnets, or check whether an address falls inside it. IPv6 uses exact big-number arithmetic and the standard compressed notation. Everything is calculated on your device; no address is looked up, contacted or sent anywhere.
How to use it
- Type an address with a prefix, such as 192.168.1.10/24 or 2001:db8::/32.
- Read the network details, or enter a longer prefix to split the block.
- Paste another address to check whether it belongs to the network.
Example
192.168.1.10/24 is the network 192.168.1.0/24 with mask 255.255.255.0, broadcast 192.168.1.255 and 254 usable hosts from .1 to .254.
Private and special ranges
The tool labels common special ranges, such as the private blocks 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, loopback, link-local and CGNAT space, and the IPv6 unique-local, link-local and documentation ranges. To find the address your own connection uses, see what is my IP address.
How the numbers are worked out
A prefix such as /26 means the first 26 of 32 bits identify the network, which leaves 6 bits for hosts. The block therefore holds 26 = 64 addresses, and a normal IPv4 subnet reserves the first (network) and last (broadcast) address, leaving 2(32 − prefix) − 2 usable hosts.
Worked example: 203.0.113.77/26 sits in the network 203.0.113.64/26. The mask is 255.255.255.192, the range runs from 203.0.113.64 to 203.0.113.127, the broadcast address is 203.0.113.127 and the 62 usable hosts run from .65 to .126. Two special cases follow the standards: a /31 is a point-to-point link where both of its two addresses are usable, and a /32 is a single host. IPv6 has no broadcast address, so IPv6 results show the full range instead.
Questions
How many usable hosts does a /24 have?
254. A /24 has 256 addresses; the first is the network address and the last is the broadcast address, so two are not assignable to hosts.
What about /31 and /32 networks?
A /31 is a point-to-point link where both addresses are usable (RFC 3021) and a /32 is a single address. The calculator handles both rather than reporting negative host counts.
Can I enter a subnet mask instead of a prefix?
Yes for IPv4: 10.0.0.0/255.255.254.0 is read as /23. Masks that are not a run of ones followed by zeros are rejected.
Does IPv6 have broadcast addresses?
No. IPv6 uses multicast instead, so the tool shows the first and last address of the block and the total count.
Does it look up who owns an address?
No. It is arithmetic only. Use an IP lookup or WHOIS service for ownership.
Get practical SEO tips by email
Occasional emails with new guides and tools. Confirm by email first; unsubscribe in one click.