Subnet / CIDR Calculator
Enter an IPv4 address with a prefix or mask to get the network, broadcast, mask, wildcard, host range and usable hosts. Split it into smaller subnets, or check an IPv6 prefix.
Updated November 19, 2026
IPv4 subnet
Examples: 192.168.1.10/24, 10.0.0.0/8, 172.16.5.4 255.255.252.0
| Network address | 192.168.1.0/24 |
|---|---|
| Broadcast address | 192.168.1.255 |
| Subnet mask | 255.255.255.0 |
| Wildcard mask | 0.0.0.255 |
| First usable host | 192.168.1.1 |
| Last usable host | 192.168.1.254 |
| Mask in binary | 11111111.11111111.11111111.00000000 |
| Address class | C |
| Address type | Private (RFC 1918) |
Split into subnets
Between /24 and /32.
Picks the smallest prefix that fits.
4 subnets of /26 (62 usable hosts each).
| Subnet | Host range | Broadcast |
|---|---|---|
| 192.168.1.0/26 | 192.168.1.1 – 192.168.1.62 | 192.168.1.63 |
| 192.168.1.64/26 | 192.168.1.65 – 192.168.1.126 | 192.168.1.127 |
| 192.168.1.128/26 | 192.168.1.129 – 192.168.1.190 | 192.168.1.191 |
| 192.168.1.192/26 | 192.168.1.193 – 192.168.1.254 | 192.168.1.255 |
IPv6 prefix
Example: 2001:db8:abcd:12::1/64
| Network | 2001:db8::/32 |
|---|---|
| First address | 2001:db8:: |
| Last address | 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff |
| Total addresses | 79,228,162,514,264,337,593,543,950,336 |
| /64 subnets inside | 4,294,967,296 |
How subnetting works
The prefix length says how many leading bits identify the network. The rest identify hosts. A /24 keeps 24 bits for the network and 8 for hosts, giving 28 = 256 addresses, of which 254 are usable (the network and broadcast addresses are reserved).
Worked examples
- 192.168.1.10/24: network 192.168.1.0, broadcast 192.168.1.255, mask 255.255.255.0, hosts 192.168.1.1 to 192.168.1.254 (254 usable).
- 10.20.30.40/20 (mask 255.255.240.0): network 10.20.16.0, broadcast 10.20.31.255, hosts 10.20.16.1 to 10.20.31.254 (4,094 usable).
Pointing a domain at a new server? Check how DNS has spread with the DNS propagation checker, and verify the site's certificate with the SSL certificate checker.
See also
- Pointing a domain at a new IP? Check DNS with the DNS propagation checker.
- Authorising a mail server range? Build the SPF record with the SPF and DMARC generator.
- Setting up hosting? Verify your certificate with the SSL certificate checker.
Frequently Asked Questions (FAQ)
Convert the prefix length to a mask (/24 is 255.255.255.0), AND it with the IP address to get the network address, and set all host bits to 1 to get the broadcast address. Usable hosts run from network + 1 to broadcast − 1. The calculator does all of it.
A /24 has 256 addresses and 254 usable hosts, a /26 has 64 and 62, and a /30 has 4 and 2. The formula is 2^(32 − prefix) − 2, because the network and broadcast addresses cannot be assigned to hosts.
A /31 has two addresses and both are usable (point-to-point links, RFC 3021). A /32 is a single host address, used for loopbacks and firewall rules.
The inverse of the subnet mask: 255.255.255.0 becomes 0.0.0.255. It is used in Cisco ACLs and OSPF network statements to say which bits may vary.
Increase the prefix length. Each extra bit doubles the number of subnets and halves their size, so a /24 split into /26 gives four subnets of 64 addresses. Pick the new prefix in the splitter, or enter the number of hosts you need.
Yes, for prefix information: enter an address with a prefix such as 2001:db8::/32 to see the network, first and last address, the total addresses and how many /64 subnets it holds. IPv6 has no broadcast address and usable-host counts are not meaningful.
No. All the maths runs in your browser.
Related Tools
- Bcrypt Hash Generator & CheckerGenerate bcrypt hashes with a chosen cost factor or check a password against a hash. Runs in your browser; nothing is sent or stored.
- SHA-256 & MD5 Hash Generator and CheckerGenerate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text or files and check them against a checksum. Runs in your browser; nothing is uploaded.
- Password Strength CheckerTest password strength in your browser: see entropy in bits and estimated crack time. Nothing is sent or stored.
- Password GeneratorCreate strong, secure passwords with customizable options.
- DNS Propagation CheckerLook up A, AAAA, CNAME, MX, TXT and NS records on Google, Cloudflare and Quad9 and compare each answer and its TTL.
- SSL Certificate CheckerCheck a public hostname's SSL/TLS certificate: validity, expiry date and days left, issuer, hostname match, chain and TLS version.