🌐 IPv4 Subnet Calculator
Calculate CIDR ranges, masks, and host details instantly in your browser.
Last updated: November 8, 2026 · By the BoltQuickTools team
Working out the boundaries of an IPv4 subnet
Before writing a firewall rule, sizing a DHCP scope or carving up a VPC, you need the exact first and last address of a range. Doing that binary by hand is where off-by-one mistakes come from, so this page calculates it for one address and prefix at a time.
Entering an address and prefix
- Type a plain address in IPv4 Address, for example
10.20.30.40. - Drag Prefix Length to the size you want, from /0 to /32. The arrow keys move it one step when the slider has focus.
- Results appear about 300 ms after any change, or straight away with Calculate. Load Sample fills in 192.168.10.24/24 and Clear resets the form.
The address does not have to be the network address. Enter any host and the page snaps to the block that contains it.
Example: 10.20.30.40 with /26
| Row | Value |
|---|---|
| Subnet Mask | 255.255.255.192 |
| Wildcard Mask | 0.0.0.63 |
| Network Address | 10.20.30.0 |
| Broadcast Address | 10.20.30.63 |
| First Host | 10.20.30.1 |
| Last Host | 10.20.30.62 |
| Total Addresses | 64 |
| Usable Hosts | 62 |
| Class | A |
| Address Type | Private (RFC1918) |
| Mask Binary | 11111111.11111111.11111111.11000000 |
A /31 and /32 are treated specially. 203.0.113.8/31 gives First Host 203.0.113.8, Last Host 203.0.113.9 and Usable Hosts 2, the point-to-point style of use. 8.8.8.8/32 gives Usable Hosts 1.
Input and output quirks
- CIDR text is not accepted in the address box.
10.20.30.40/26returns "Enter a valid IPv4 address, such as 192.168.1.10". The prefix must be set with the slider. - Address Type knows only the three RFC1918 private blocks. Loopback
127.0.0.1reports "Public or special-use", and so do link-local 169.254.x.x and carrier-grade NAT 100.64.0.0/10. Do not treat that row as proof an address is routable. - Class is the historical label from the first octet and has no effect on the calculation. Classless routing ignores it.
- Multicast addresses still get host figures. 224.0.0.1/24 shows Class "D (Multicast)" and 254 usable hosts, which is not meaningful for multicast.
- Leading zeros are read as decimal, so
010.1.1.1becomes 10.1.1.1. Some older network software reads that as octal 8.1.1.1. - Usable Hosts is plain arithmetic. It does not subtract gateway addresses or the addresses a cloud provider reserves in each subnet.
- It handles one subnet at a time. There is no list of sibling subnets and no overlap check between two ranges.
Reading the results
Why does a /31 list a broadcast address?
The row always shows the top address of the block. On a /31 that is 203.0.113.9 in the example above, which is a normal usable endpoint rather than a real broadcast.
Can I use the wildcard mask in an ACL?
Yes, that is the format Cisco-style access lists expect. For the example above you would write network 10.20.30.0 with wildcard 0.0.0.63.
How do I check whether two addresses share a subnet?
Enter each one with the same prefix and compare the Network Address row. If they match, the addresses are in the same block.
For the reasoning behind these numbers, read subnet math explained. The Number Base Converter helps if you want to check the binary yourself, and the IPv6 Subnet Calculator covers 128-bit addresses.