IP subnet calculator (IPv4 and IPv6)
Type an IP address with a prefix length, such as 192.168.1.10/24 or 2001:db8::/48, or an IPv4 address followed by a netmask. The calculator shows the network address, the broadcast or last address, the usable host range, the number of addresses and usable hosts, the netmask and wildcard mask, the address type (private, public, loopback, documentation and so on), the expanded and binary forms and the reverse DNS name. You can then split the network into equal smaller subnets. IPv6 addresses are shown in the standard compressed form.
Examples: 192.168.1.10/24, 10.0.0.1 255.255.0.0, 2001:db8::1/64
Enter an IPv4 or IPv6 address to see its subnet.
How to use the IP Subnet Calculator
- 1
Enter an address and prefix
Type CIDR notation such as 10.0.0.0/16, or an IPv4 address and a netmask such as 10.0.0.1 255.255.0.0.
- 2
Read the subnet details
Network, broadcast, host range, mask and host count appear straight away.
- 3
Split it if needed
Enter a longer prefix, such as 26 for a /24, to list the smaller subnets it contains.
How subnets are calculated
The prefix length says how many leading bits identify the network. The network address keeps those bits and sets the rest to zero; the broadcast (in IPv6, the last address) sets the rest to one. The number of addresses is 2 to the power of the remaining bits.
In IPv4 the network and broadcast addresses are not usable for hosts, so a /24 has 254 usable hosts. Point-to-point /31 links use both addresses (RFC 3021), and a /32 is a single host. IPv6 has no broadcast address.
- network = address AND mask
- broadcast = network OR NOT mask
- addresses = 2^(32 − prefix) for IPv4, 2^(128 − prefix) for IPv6
- usable IPv4 hosts = addresses − 2 (for /30 and shorter)
When to use it
- Plan IP ranges for a home, office or cloud network (VPC).
- Check which host addresses and broadcast belong to a CIDR block in a firewall rule.
- Split an IPv6 /48 or an IPv4 /24 into smaller subnets.
- Study for networking exams such as CCNA or Network+.
Limits
- Calculations only: the tool does not scan, ping or look up any address.
- IPv4 addresses with leading zeros (such as 010.1.1.1) are rejected because tools disagree on whether they are octal.
- Subnet lists show the first 256 networks; the total is always given.
Privacy
Everything is calculated in your browser. No address you type is sent anywhere or looked up.
Frequently asked questions
How many usable hosts are in a /24?
254. A /24 has 256 addresses; the first is the network address and the last is the broadcast address, which leaves 254 for hosts.
What is a wildcard mask?
The inverse of the netmask. 255.255.255.0 becomes 0.0.0.255. Cisco access lists and OSPF use wildcard masks to match address ranges.
Why does a /31 show two usable hosts?
RFC 3021 allows /31 networks on point-to-point links, where both addresses are used by the two ends and no broadcast is needed.
Which IPv4 ranges are private?
10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918). 100.64.0.0/10 is shared address space used by carrier-grade NAT.
How do I write an IPv6 address in short form?
Drop leading zeros in each group and replace the longest run of zero groups with a double colon, once. 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1, as RFC 5952 recommends.
Can I enter a netmask instead of a prefix length?
Yes, for IPv4. Type the address, a space and the mask, for example 192.168.1.5 255.255.255.0. The mask must have contiguous ones.
Does the calculator contact the address I type?
No. It does pure arithmetic in your browser and never connects to, scans or looks up any address.
Guides
Related tools
People also use
- JWT Generator & SignerCreate and sign JSON Web Tokens with HMAC, RSA or ECDSA keys, entirely in your browser.
- CSV to JSON ConverterConvert CSV ⇄ JSON with correct quoting, types and nested data.
- UUID GeneratorBulk UUID v4 and v7 generator with a UUID inspector.
- JSON FormatterBeautify, validate, minify and sort JSON.
Last updated November 22, 2026 · How we build and test our tools