Subnet calculator
- Network address
- 192.168.1.0
- Broadcast address
- 192.168.1.255
- First usable host
- 192.168.1.1
- Last usable host
- 192.168.1.254
- Usable hosts
- 254
- Total addresses
- 256
- Subnet mask
- 255.255.255.0
- Wildcard mask
- 0.0.0.255
- CIDR notation
- 192.168.1.0/24
- Address range
- 192.168.1.0 – 192.168.1.255
- Class
- C
- Scope
- Private (RFC 1918)
- Mask in binary
- 11111111.11111111.11111111.00000000
- Address in binary
- 11000000.10101000.00000001.00111001
- Subnets of /26
- 4
- Usable hosts in each
- 62
- Smallest block for 50 hosts
- /26
Calculated in your browser · nothing is looked up or uploaded
Give it any address and a prefix and it returns the network address, broadcast address, first and last usable host, the mask and wildcard, the total and usable address counts, and the scope — plus how the block splits into smaller subnets.
How to use the subnet calculator
A subnet mask is a run of ones followed by a run of zeros, and everything else follows from that. The ones mark the network part of the address and the zeros the host part, so ANDing an address with its mask gives the network address, and ORing it with the inverted mask gives the broadcast. That is the whole calculation — the rest is presentation.
The usable count is total minus two, because the all-zeros host is the network itself and the all-ones host is the broadcast. Two prefixes break that rule and both are common in real configurations. A /31 has no broadcast at all: RFC 3021 defines it as a point-to-point link with two usable addresses, which is why router-to-router links are configured that way and why a calculator reporting "0 usable hosts" for a /31 is wrong. A /32 is a single host — a host route rather than a network.
One implementation note that explains a lot of broken calculators. JavaScript’s bitwise operators return a signed 32-bit integer, so any address from 128.0.0.0 up comes back negative and prints as nonsense. Every value here is pushed back through an unsigned shift. If a subnet calculator gives you sensible answers for 10.x and garbage for 200.x, that is the bug.
The wildcard mask — the inverted subnet mask — is worth knowing because Cisco access lists and OSPF use it instead of a subnet mask, and reading one as the other silently matches the wrong addresses.
Questions
The all-zeros host is the network address and the all-ones host is the broadcast. Neither can be assigned to a machine.