CIDR / Subnet Calculator
See every address in a block, split it into subnets and check what is inside.
Free · No signupCalculated in your browser
Add a prefix such as /24, or a mask such as 255.255.255.0. A bare address is one host.
10.0.0.0/24 IPv4 · Private
256 addresses, 254 usable, from 10.0.0.1 to 10.0.0.254. RFC 1918 private network, not routed on the internet.
Address in binary
Network 24 bitsHost 8 bits
The numbers
- Network address
10.0.0.0- Broadcast address
10.0.0.255- First usable
10.0.0.1- Last usable
10.0.0.254- Usable hosts
254- Total addresses
256- Subnet mask
255.255.255.0- Wildcard mask
0.0.0.255
In the cloud, a subnet this size has fewer: AWS and Azure reserve 5 addresses (251 usable), Google Cloud reserves 4 (252 usable).
Check a server, a firewall source or another block against this one.
Split into subnets
4 subnets of /26.
10.0.0.0/2610.0.0.1 – 10.0.0.6210.0.0.64/2610.0.0.65 – 10.0.0.12610.0.0.128/2610.0.0.129 – 10.0.0.19010.0.0.192/2610.0.0.193 – 10.0.0.254
Every value updates as you type. Nothing leaves this page.
From subnets to the servers on them
Check each server’s firewall with CtrlOps.
Run 25 security audits over SSH, including firewall rules, open ports and IPv6 coverage, with fixes that wait for your approval.
Keep it handy
IPv4 subnet sizes,
at a glance.
Each step down the table halves the block. Usable hosts leave out the network and broadcast addresses, except on /31 links and /32 hosts.
| Prefix | Subnet mask | Addresses | Usable hosts | Often used for |
|---|---|---|---|---|
/8 | 255.0.0.0 | 16,777,216 | 16,777,214 | Very large private networks (10.0.0.0/8) |
/16 | 255.255.0.0 | 65,536 | 65,534 | A cloud VPC or campus network |
/20 | 255.255.240.0 | 4,096 | 4,094 | A large cloud subnet |
/22 | 255.255.252.0 | 1,024 | 1,022 | A busy office or a large application tier |
/24 | 255.255.255.0 | 256 | 254 | One LAN or one cloud subnet |
/26 | 255.255.255.192 | 64 | 62 | A small team or service tier |
/27 | 255.255.255.224 | 32 | 30 | A handful of servers |
/28 | 255.255.255.240 | 16 | 14 | The smallest AWS subnet |
/29 | 255.255.255.248 | 8 | 6 | A tiny server group |
/30 | 255.255.255.252 | 4 | 2 | A point-to-point link, the classic way |
/31 | 255.255.255.254 | 2 | 2 | A point-to-point link (RFC 3021) |
/32 | 255.255.255.255 | 1 | 1 | One host: firewall rules and routes |
How the bits split
Network first.
Hosts after.
What CIDR notation means
10.0.0.0/24 is an address and a prefix length. The prefix counts how many leading bits name the network; the rest number the hosts. An IPv4 address has 32 bits, so a /24 leaves 8 host bits: 256 addresses. A shorter prefix is a larger network.
Masks are the same idea in dotted form
A subnet mask writes the prefix as ones and zeros: a /24 is 24 ones, or 255.255.255.0. A device finds the network by combining its address with the mask, bit by bit. The wildcard mask, 0.0.0.255, is the inverse and appears in router access lists.
Two addresses are taken
In IPv4 the first address names the network and the last is the broadcast address, so a subnet has two fewer usable hosts than addresses. A /31 skips both for point-to-point links, and a /32 is a single host for routes and firewall rules. IPv6 has no broadcast address.
Private and special ranges
10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are private and never routed on the internet. Loopback, link-local, carrier-grade NAT, documentation and multicast ranges have their own jobs. The calculator names the range a block belongs to, or tells you when it spans several.
IPv6 works the same way, with more room
IPv6 addresses have 128 bits, written as eight groups of hex. Each network segment usually gets a /64, and a site gets a /48 or /56 to divide among them. Zeros compress to ::, which the calculator writes in the standard short form.
Before you plan a network
Subnets,
explained.
What does /24 mean in an IP address?
The /24 is the CIDR prefix length: the first 24 bits are the network portion and the remaining 8 bits are for hosts. That equals a subnet mask of 255.255.255.0, 256 total addresses, and 254 usable host addresses (after reserving the network and broadcast addresses).
How many hosts are in a subnet?
For a given prefix, total addresses = 2^(32 - prefix), and usable hosts = total minus 2 (the network and broadcast addresses). For example a /26 has 2^6 = 64 addresses and 62 usable hosts. The exceptions are /31 (2 usable, for point-to-point links) and /32 (a single host).
What is the difference between a subnet mask and a wildcard mask?
A subnet mask (e.g. 255.255.255.0) marks the network bits with ones. A wildcard mask is its inverse (0.0.0.255) and marks the bits to ignore with ones. Subnet masks are used to define networks; wildcard masks appear in Cisco access-control lists and OSPF configuration.
What are the private IP address ranges?
RFC 1918 reserves three ranges for private networks: 10.0.0.0/8 (10.0.0.0-10.255.255.255), 172.16.0.0/12 (172.16.0.0-172.31.255.255), and 192.168.0.0/16 (192.168.0.0-192.168.255.255). These are not routable on the public internet and are used behind NAT.
What are the network and broadcast addresses?
In a conventional IPv4 subnet, the network address is the first address (all host bits 0) and names the subnet itself. The broadcast address is the last address (all host bits 1) and sends to hosts on that subnet. Both are excluded from the usable host count. The /31 and /32 cases are exceptions, and IPv6 has no broadcast address.
What is the difference between a /31 and a /32?
A /32 is a single IP address (one host) - handy for firewall rules and host routes. A /31 covers two addresses and, under RFC 3021, both are usable for point-to-point links since no broadcast address is needed. Standard subnets (/30 and larger) reserve the network and broadcast addresses.
Keep exploring
Tools and guides for your next step.