Subnet Calculator
Enter an IP address and prefix length to calculate subnet information.
Subnet Calculator
Enter an IP address and prefix length to calculate subnet information.
Subnet Visualization
Subnet Details
| Prefix Length | /24 | Total Addresses | 256 |
| Subnet Mask (Decimal) | 255.255.255.0 | Usable Hosts | 254 |
| Subnet Mask (Binary) | 11111111.11111111.11111111.00000000 | ||
| Wildcard Mask | 0.0.0.255 | Host Bits | 8 |
How to use the subnet calculator
- Enter an IPv4 address followed by a CIDR prefix, for example 192.168.10.0/24.
- Click Calculate. You get your network address, broadcast address, usable host range, and subnet mask back.
- See how the prefix carves up an IP address, bit by bit. The visualization strip shows you exactly where the network ends and the host portion begins—no guessing, just the math laid bare.
Frequently asked questions
How do I calculate a /27 subnet by hand?
A /27 has 5 host bits, so 2^5 = 32 addresses per block. Subtract 2 for the network and broadcast and you get 30 usable hosts. The block boundary in the fourth octet steps by 32: .0, .32, .64, .96 and so on.
What is the difference between network address and broadcast address?
The network address—that's the one with every host bit zeroed out—it names the subnet itself. Can't assign it to a machine. Then there's the broadcast address, which flips all those host bits to 1. That one reaches every device on the subnet. Also can't hand it to a host. So you've got two addresses locked away on every subnet. The network address identifies what you're working with. The broadcast gets the message to everyone at once. Neither plays a role as an actual interface address.
Why are 2 addresses subtracted from the total host count?
In classic IPv4 subnetting, the all-zeros host portion serves as the network address itself, while the all-ones portion becomes the directed broadcast. That's two addresses locked away on every subnet. RFC 3021 breaks that rule for /31 point-to-point links. Both addresses become usable. No waste.
How is a /31 subnet used in point-to-point links?
RFC 3021 lets you use /31 prefixes on point-to-point links—just two addresses, both usable for actual hosts. No more /30 overhead burning a third of your space on router-to-router connections.