IP Subnet Calculator
Enter an IPv4 address and prefix length to see the full subnet breakdown, updated live as you type.
- Network address
- 192.168.1.0/24
- Broadcast address
- 192.168.1.255
- First usable host
- 192.168.1.1
- Last usable host
- 192.168.1.254
- Usable hosts
- 254
- Subnet mask
- 255.255.255.0
- Wildcard mask
- 0.0.0.255
- IP class
- Class C
- Scope
- Private (RFC 1918)
Binary view — network bits | host bits
CIDR reference table (/8 – /30)
| CIDR | Subnet mask | Usable hosts |
|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 |
| /9 | 255.128.0.0 | 8,388,606 |
| /10 | 255.192.0.0 | 4,194,302 |
| /11 | 255.224.0.0 | 2,097,150 |
| /12 | 255.240.0.0 | 1,048,574 |
| /13 | 255.248.0.0 | 524,286 |
| /14 | 255.252.0.0 | 262,142 |
| /15 | 255.254.0.0 | 131,070 |
| /16 | 255.255.0.0 | 65,534 |
| /17 | 255.255.128.0 | 32,766 |
| /18 | 255.255.192.0 | 16,382 |
| /19 | 255.255.224.0 | 8,190 |
| /20 | 255.255.240.0 | 4,094 |
| /21 | 255.255.248.0 | 2,046 |
| /22 | 255.255.252.0 | 1,022 |
| /23 | 255.255.254.0 | 510 |
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
All calculations run locally in your browser — no lookups, nothing is sent anywhere.
How it works
- Type an IPv4 address such as 192.168.1.10 into the address field.
- Set the prefix length with the CIDR input or pick a subnet mask from the dropdown — the two stay in sync.
- Read the network, broadcast, host range and binary breakdown below, then copy the summary if you need it elsewhere.
Frequently asked questions
- How is the network address calculated from an IP and CIDR prefix?
- The calculator performs a bitwise AND between the 32-bit address and the subnet mask, which zeroes every host bit. The broadcast address is the opposite: all host bits set to one. You can see exactly which bits belong to each part in the binary view.
- Why does a /24 network have 254 usable hosts instead of 256?
- Two addresses in every conventional subnet are reserved: the network address itself (all host bits zero) and the broadcast address (all host bits one). That leaves 2^(host bits) minus 2 assignable addresses, so a /24 gives 256 − 2 = 254 hosts.
- What are /31 and /32 subnets used for?
- A /31 has no room for network and broadcast addresses, so per RFC 3021 both addresses are usable — it is common on point-to-point router links. A /32 identifies a single host and is typical for loopback interfaces and per-host firewall or routing rules.
- Is my IP address sent anywhere when I use this calculator?
- No. Every calculation is plain integer math running in your browser — there are no lookups, no API calls and no logging. You can load the page, disconnect from the internet and it will keep working exactly the same.
- How do I know if an address is private or public?
- Three ranges are reserved for private networks by RFC 1918: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. The calculator checks these automatically and also flags loopback (127.0.0.0/8), link-local (169.254.0.0/16) and carrier-grade NAT (100.64.0.0/10) ranges.
About this tool
This subnet calculator takes any IPv4 address with a CIDR prefix length or dotted-decimal netmask and derives everything you normally need when planning or troubleshooting a network: the network address, broadcast address, first and last usable host, total usable host count and the wildcard mask used in Cisco access-list syntax. Results recalculate live on every keystroke, so you can sweep through prefix lengths and immediately see how the host range changes.
All of the work is bitwise arithmetic on a single 32-bit integer, performed entirely in your browser. Nothing is uploaded, resolved or looked up — the tool works offline and never sees your addressing plan, which matters when you are working with internal infrastructure that should not be pasted into random websites. The binary view renders the address and mask bit by bit with the network/host boundary marked, which is the fastest way to build real intuition for why a given address lands in a given subnet.
Typical uses include splitting an office network into VLAN-sized blocks, checking whether two hosts share a subnet before blaming a routing problem, writing firewall rules that need a wildcard mask, and studying for certification exams where you must subnet by hand. The classful note (A, B, C, D, E) and private/public detection help when reading legacy documentation or auditing configurations.
A practical tip: when carving up an address block, start from the host count you actually need and round up to the next power of two, leaving room to grow. A /26 (62 hosts) is often a better fit for a small office than a full /24, and keeping subnets aligned on their natural boundaries makes route summarization far cleaner later. The CIDR reference table under Options lists every prefix from /8 to /30 with its mask and host count for quick lookup.