Tools / Subnet calculator
IPv4 subnet calculator
Enter an address and a prefix or mask to see the network, broadcast, usable host range, wildcard mask and binary. Free, no sign-up.
Subnet calculator
This is an example. Change anything to make it yours.
- Network
- 192.168.1.0/24
- Subnet mask
- 255.255.255.0
- Wildcard mask
- 0.0.0.255
- Broadcast
- 192.168.1.255
- First usable host
- 192.168.1.1
- Last usable host
- 192.168.1.254
- Usable hosts
- 254
- Total addresses
- 256
- Type
- Private (RFC 1918)
- Binary
- 11000000.10101000.00000001.00000000
11111111.11111111.11111111.00000000
Share or keep this result
Paste the link into a forum post or an article and it turns into a card with your numbers on it. The numbers are worked out from the link, so they always match this page.
Sign in to save results and come back to them later.
How a subnet is worked out
A /24 has 256 addresses: the first is the network, the last is the broadcast, and 254 are left for hosts. Every step down in prefix length halves the room, so a /25 has 126 usable hosts and a /26 has 62.
To split a network into a subnet for each VLAN, use the VLAN planner.
Questions about this tool
How do I calculate a subnet?
The prefix length says how many leading bits of the address name the network. The rest name hosts. Zero the host bits for the network address, set them all to one for the broadcast address, and the addresses between are the usable hosts.
What is the difference between a prefix and a mask?
/24 and 255.255.255.0 say the same thing: the first 24 bits are the network. You can enter either, with the address, and the calculator shows both.
What is a wildcard mask?
It is the subnet mask turned inside out (255.255.255.0 becomes 0.0.0.255). Cisco access lists and OSPF network statements use it to say which bits of an address to ignore.
Why are /31 and /32 different?
A /31 has two addresses and no broadcast, which is used on point-to-point links. A /32 is a single host. Everything larger loses two addresses to the network and broadcast.
Does it support IPv6?
Not yet. This tool does IPv4 only.
Save your results and join the community
Create a free account to keep what you work out, and to ask other homelab builders about your setup.