Subnet calculator
Paste a CIDR block, a subnet mask, a wildcard, or a whole line of
ifconfig output. It works out the rest as you type. Nothing is
sent anywhere: the arithmetic runs in your browser.
Binary
How to read the results
The network address is the first address in the block and identifies the network itself. The broadcast address is the last, and reaches every host on the segment. Everything between them is assignable, which is why a /24 holds 256 addresses but only 254 usable hosts.
The wildcard mask is the subnet mask inverted. Cisco access lists and OSPF network statements use wildcards, and writing one where the other belongs is a classic way to lose an afternoon.
Looking for a list of values? The subnet mask table lists every prefix from /0 to /32 with its mask, wildcard and host count.
The cases most calculators get wrong
A /31 has no broadcast address and two usable hosts. It is meant for point-to-point links, where a broadcast address would be wasted: RFC 3021 describes it. Many calculators report zero usable hosts, which would make the prefix useless if it were true.
A /32 is a single host: a loopback interface, a host route, a certificate SAN. It has one usable address, not zero.
For IPv6, the useful question is usually not how many addresses a prefix holds but how many /64 subnets, because /64 is the unit IPv6 is actually delegated in. Address counts here are exact. A /0 holds a thirty-nine digit number, and this reports it without rounding.
Subnet mask calculator, CIDR calculator, IP subnet calculator: one job
These are names for one piece of arithmetic, and which one you use mostly
says where you learned networking. A subnet mask calculator
takes 255.255.255.0; a CIDR calculator takes
/24. They are the same value written two ways: the mask is
the prefix length painted out in dotted decimal. A wildcard mask
calculator inverts it again to 0.0.0.255, which is
the form Cisco access lists want.
IP subnet calculator means the same thing. IP address calculator is the one genuinely ambiguous name: sometimes it means dividing a block into subnets, and sometimes it means converting a single address between decimal, binary and hex. This page does both: the binary panel under the results shows the address and the mask laid out bit by bit, which is where a prefix boundary stops being an abstraction.
Any of those inputs work here, along with raw ifconfig
output. You do not need to know which name your input has.
What it accepts
- CIDR notation:
10.0.0.0/8 - An address and a dotted mask:
192.168.1.10 255.255.255.0 - A Cisco wildcard:
10.1.1.0 0.0.0.255 - BSD
ifconfig, including hex netmasks like0xffffff00 - IPv6 in compressed or expanded form, with or without a prefix
When the prefix came from a mask, a wildcard or a hex netmask, the tool says so above the results, so you can see what it inferred instead of taking it on trust.