Free tool
Subnet calculator
Type an IPv4 address with a prefix length, such as 10.20.30.40/22, and see the whole subnet it belongs to: network address, subnet mask, wildcard mask, broadcast address, first and last usable host and how many hosts fit. It runs in your browser, so nothing is sent anywhere.
| Network address | 192.168.1.0/24 |
|---|---|
| Subnet mask | 255.255.255.0 |
| Wildcard mask | 0.0.0.255 |
| 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 |
Highlights
Every number you need
Network address, subnet mask, wildcard (inverse) mask, broadcast address, first host, last host and the count of usable hosts.
Any address in the block
You don't need the network address. Type any address inside the subnet and the calculator works out the block it belongs to.
/31 and /32 done right
A /31 point-to-point link (RFC 3021) and a /32 single host have no separate network and broadcast addresses, so every address counts as a host.
Private by design
The sums happen in your browser. Nothing you type leaves your computer.
How it works
Set it up in a few steps
- 01
Enter an address and prefix
Write it in CIDR notation: an IPv4 address, a slash and a prefix length from 0 to 32. For example 192.168.1.77/26.
- 02
Read the results
The table shows the network the address belongs to and its range. Copy whichever value you need into your firewall, router or cloud console.
- 03
Try a different size
Change the prefix to see how the block grows or shrinks: each step down (/26 to /25) doubles the number of addresses.
The details
Exactly what it does
| Input | IPv4 address and prefix length in CIDR notation, /0 to /32 |
|---|---|
| Results | Network, subnet mask, wildcard mask, broadcast, first host, last host, usable hosts |
| Usable hosts | 2^(32 − prefix) − 2 for /0 to /30; all addresses for /31 and /32 |
| IPv6 | Not supported by this calculator |
| Where it runs | In your browser |
FAQ
Frequently asked questions
What is CIDR?
Classless Inter-Domain Routing. It writes a network as an address plus the number of leading bits that are fixed, so 192.168.1.0/24 means the first 24 bits are the network and the last 8 bits number the hosts: 256 addresses in all.
Why are there two fewer usable hosts than addresses?
In an ordinary subnet the first address names the network itself and the last is the broadcast address, so neither can be given to a device. A /24 has 256 addresses and 254 usable hosts.
Why does a /31 show two usable hosts?
RFC 3021 lets a /31 be used for point-to-point links, where both addresses are hosts and there is no broadcast address. A /32 is a single host. The calculator treats both that way.
What is a wildcard mask?
The subnet mask with every bit flipped. A /24 has the mask 255.255.255.0 and the wildcard 0.0.0.255. Some router and firewall access lists ask for the wildcard instead of the mask.
Start monitoring in 30 seconds
There’s nothing to install and no card to enter. The free plan stays free.
Get started free