About this tool
CIDR notation writes a block of IP addresses as an address and a prefix length, such as 192.168.1.0/24. The prefix says how many leading bits identify the network, and the remaining bits identify the hosts inside it. This calculator turns that notation into the numbers you need when you plan or troubleshoot a network.
Enter an IPv4 or IPv6 address with a prefix, or an IPv4 address with a dotted netmask. You get the network and broadcast addresses, the first and last usable host, the number of hosts, the wildcard mask and the binary form. You can also check whether an address belongs to the block and split the block into smaller subnets. Everything is calculated in your browser.
Security tips
- In a normal IPv4 subnet, the first address is the network address and the last is the broadcast address, so they cannot be assigned to hosts. A /24 therefore has 254 usable addresses.
- A /31 is a special case for point-to-point links (RFC 3021). It has two usable addresses and no broadcast address. A /32 is a single host.
- The private IPv4 ranges are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Do not route them over the internet.
- For IPv6, a /64 is the standard size for one network (a LAN). Home users usually receive a /56 or /64 from their provider.
Frequently asked questions
How many usable hosts does a /24 have?
A /24 has 256 addresses. The network and broadcast addresses are reserved, so 254 are usable for hosts.
What is a wildcard mask?
It is the inverse of the netmask: where the netmask has ones, the wildcard has zeros, and the other way round. Routers and firewalls (for example in access lists) often use it. For 255.255.255.0 the wildcard mask is 0.0.0.255.
Why does a /31 or /32 not follow the usual rules?
A /32 contains one address, and a /31 contains two. Following the usual rules would leave no usable hosts, so these sizes are treated specially: /31 networks are used on point-to-point links and /32 for a single host or loopback address.
Can I calculate IPv6 subnets?
Yes. IPv6 does not use a broadcast address, so the tool shows the first and last address of the block and how many addresses it contains.
Related tools
What Is My IP Address?
See your public IP address, approximate location, internet provider, reverse DNS and browser details in one click.
DNS Lookup
Look up A, AAAA, MX, NS, TXT, CNAME, SOA and CAA records for any domain and see if DNSSEC is validated.
Suspicious URL Analyzer
Paste a link to spot phishing tricks such as look-alike domains, hidden usernames, disguised IP addresses and link shorteners, without opening it.