GONDAL AI / FREE TOOLS
Subnet Calculator
Work out any IPv4 subnet from an address and a CIDR prefix or mask: network and broadcast addresses, the usable host range, total and usable host counts, and the wildcard mask. The CIDR and mask fields stay in sync as you type.
Free · No signup · No watermark · Works in your browserChange the CIDR or the mask — they stay in sync.
| Network address | — |
|---|---|
| Broadcast address | — |
| Usable host range | — |
| Total addresses | — |
| Usable hosts | — |
| Wildcard mask | — |
| Network type | — |
How subnetting works
An IPv4 address is 32 bits. The CIDR prefix — the /24 in 192.168.1.0/24 — says how many of those bits name the network; the rest name individual hosts inside it. A /24 leaves 8 host bits, so the block holds 28 = 256 addresses. The first address is the network itself and the last is the broadcast address, leaving 254 usable hosts — the rule behind the classic home-network range 192.168.1.1 to 192.168.1.254. Halving is the whole game: every +1 on the prefix halves the block (/25 = 128 addresses, /26 = 64), and every −1 doubles it (/23 = 512). The wildcard mask is simply the subnet mask with every bit flipped — Cisco ACLs and OSPF statements ask for it that way. Two special cases: a /31 has no spare addresses for network and broadcast under the classic rules (it is used for point-to-point links under RFC 3021), and a /32 is exactly one host.
What this tool does
This subnet calculator takes an IP address and a network size — given as a CIDR prefix or as a subnet mask, whichever you have — and works out the complete picture of that network: network address, broadcast address, first and last usable host addresses, total and usable host counts, and the wildcard mask. It also classifies the address for you (private, public, loopback and other special ranges). The CIDR and mask fields stay in sync, so changing one rewrites the other.
How to use it
- Enter any IP in the network — type an address such as 192.168.1.10 — it does not have to be the network address itself.
- Set the size either way — choose a CIDR prefix like /24 or type a subnet mask like 255.255.255.0 — whichever you edit, the other follows automatically.
- Read the network panel — network, broadcast, usable range, host counts and wildcard mask all recalculate as you type.
- Check the network type line — the panel flags whether the address is private, public, loopback or another reserved range — a fast sanity check before you configure anything.
Questions about this tool
Why are there two fewer usable hosts than total addresses?
In a normal subnet the first address names the network itself and the last is the broadcast address, so neither can be assigned to a device. A /24 therefore has 256 total addresses and 254 usable hosts. (Deliberate point-to-point /31 links and single-host /32 routes are special cases with their own rules.)
What is the wildcard mask used for?
It is the subnet mask flipped bit for bit — 255.255.255.0 becomes 0.0.0.255. Cisco access-control lists and routing protocols such as OSPF and EIGRP ask for wildcard masks instead of subnet masks, so the calculator displays it ready-made instead of leaving you to invert 32 bits by hand.
How it works
- Enter your dates or numbers — everything is calculated on your device
- Read the answer — results update the moment you change an input
- Adjust and compare — try another date or figure — it is instant
This tool runs entirely in your browser. Your text is never uploaded, never stored, and never seen by us or anyone else — close the tab and it is gone.
Questions, answered straight
How many usable hosts are in a /24?
A /24 has 2^(32−24) = 256 addresses. Subtract the network address and the broadcast address and you get 254 usable hosts — for 192.168.1.0/24, the range 192.168.1.1 to 192.168.1.254.
What is the difference between CIDR and a subnet mask?
They say the same thing two ways. /24 means the first 24 bits are the network; written as a mask that is 255.255.255.0. CIDR is the shorthand, the mask is the bit pattern — this calculator converts between them as you type.
What is a wildcard mask used for?
It is the subnet mask with the bits flipped (for /24: 0.0.0.255). Cisco ACLs, OSPF and EIGRP network statements are written with wildcard masks, where a 0 bit means 'must match' and a 1 bit means 'don't care'.
Why does a /31 show no usable hosts?
Under the classic rules every subnet spends two addresses — network and broadcast — so a /31's two addresses are both spent. In practice /31s are used on point-to-point links under RFC 3021, where both addresses carry traffic; a /30 is the safe choice when a device insists on the classic rules.