Subnet / CIDR Calculator (IPv4)
Enter an IPv4 address with a prefix (like /24) or a subnet mask to see its network and broadcast addresses, usable host range, number of hosts, wildcard mask and binary layout — and divide it into smaller subnets.
Examples: 10.0.0.5/16, 172.16.4.1 255.255.252.0, 203.0.113.9/29
Address 11000000.10101000.00001010.01001101
Mask 11111111.11111111.11111111.11000000
Network 11000000.10101000.00001010.01000000
The first 26 bits identify the network; the remaining 6 identify hosts.
Split into smaller subnets
| # | Subnet | Usable range | Broadcast |
|---|---|---|---|
| 1 | 192.168.10.64/28 | 192.168.10.65 – 192.168.10.78 | 192.168.10.79 |
| 2 | 192.168.10.80/28 | 192.168.10.81 – 192.168.10.94 | 192.168.10.95 |
| 3 | 192.168.10.96/28 | 192.168.10.97 – 192.168.10.110 | 192.168.10.111 |
| 4 | 192.168.10.112/28 | 192.168.10.113 – 192.168.10.126 | 192.168.10.127 |
Subnetting without the binary arithmetic
Setting up a VPC, configuring a firewall rule, planning an office network or studying for a networking exam all involve the same questions: which addresses belong to this network, how many devices fit, and what is the broadcast address? The answers come from binary math on 32-bit numbers. This calculator does it instantly for any IPv4 address and prefix, and can split a network into smaller subnets.
How to use the subnet calculator
- Enter an IPv4 address with a CIDR prefix, such as
192.168.10.77/26, or with a mask, such as10.0.0.5 255.255.0.0. - Or type the address and choose the prefix from the list, which shows each prefix’s mask.
- Read the network address, broadcast address, usable host range and host count.
- Check the binary view to see which bits belong to the network and which to hosts.
- Use “Split into smaller subnets” to divide the network and list each resulting subnet.
How subnet calculations work
An IPv4 address is 32 bits. The prefix length — the number after the slash — says how many of those bits identify the network; the rest identify hosts. The subnet mask has a 1 for every network bit: /24 is 24 ones followed by 8 zeros, or 255.255.255.0. Combining the address and mask with a bitwise AND gives the network address; setting all host bits to 1 gives the broadcast address. A network with h host bits has 2h addresses, and 2h − 2 usable hosts, because the network and broadcast addresses are reserved.
| Prefix | Mask | Addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /24 | 255.255.255.0 | 256 | 254 |
| /26 | 255.255.255.192 | 64 | 62 |
| /28 | 255.255.255.240 | 16 | 14 |
| /30 | 255.255.255.252 | 4 | 2 |
Special cases and address types
- /31 networks have two addresses and no broadcast; RFC 3021 allows both to be used on point-to-point links.
- /32 describes a single host, common in firewall rules and routing tables.
- Private ranges (RFC 1918): 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are used inside homes, offices and cloud networks.
- 100.64.0.0/10 is shared address space for carrier-grade NAT (RFC 6598).
- Address classes (A, B, C) are shown for reference; modern networks use classless CIDR routing.
Planning cloud infrastructure? Check scheduled job times with the Cron Expression Generator, encode config values with the Base64 Encoder/Decoder, and validate config files with the JSON Formatter.
Frequently asked questions
What does /24 mean?
It's CIDR notation for the number of network bits. /24 means the first 24 bits identify the network, leaving 8 bits for hosts: 256 addresses, of which 254 are usable. It's the same as the mask 255.255.255.0.
Why are there 2 fewer usable hosts than addresses?
In a normal subnet, the first address identifies the network and the last is the broadcast address, so neither can be assigned to a device. /31 networks (used for point-to-point links, RFC 3021) and /32 single addresses are exceptions.
What is a wildcard mask?
It's the inverse of the subnet mask — 0.0.0.255 for a /24. Cisco access lists and some routing protocols use wildcard masks to match ranges of addresses.
Which IP ranges are private?
RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private networks. The calculator also flags loopback, link-local, carrier-grade NAT (100.64.0.0/10), multicast and reserved ranges.
Does it support IPv6?
Not yet — this calculator handles IPv4 only.