What Is a CIDR / Subnet Calculator?
A CIDR calculator (also called a subnet calculator or IP subnet calculator) takes an IP address and prefix length — such as 192.168.1.0/24 — and instantly computes every property of that network: the network address, broadcast address, first and last usable host, total host count, subnet mask, and wildcard mask. This tool also shows the binary representation of each address so you can see exactly which bits belong to the network portion and which are available for hosts.
Network administrators, DevOps engineers, cloud architects, and students use subnet calculators daily to plan IP address spaces, configure routers and firewalls, and troubleshoot connectivity problems. Doing the bit-math manually for even a /22 or /19 is error-prone; a calculator eliminates the guesswork.
How to Use This Tool
Enter an IP address and prefix length in CIDR notation — for example 10.0.0.0/8 or 192.168.100.50/28 — and the results appear instantly as you type. You can enter a host address (like 192.168.1.5/24) and the tool will automatically derive the correct network address by zeroing the host bits.
Each result field has a Copy button so you can paste individual values — the network address, subnet mask, or wildcard mask — directly into a router config, firewall rule, or Terraform variable.
Understanding the Output
| Field | Description |
|---|---|
| Network Address | First address of the subnet; identifies the network. Not assignable to a host. |
| Broadcast Address | Last address; packets here reach all hosts on the subnet. Not assignable to a host. |
| First Usable Host | Network address + 1. The lowest IP you can assign to a device. |
| Last Usable Host | Broadcast address − 1. The highest assignable IP. |
| Usable Hosts | Total addresses minus 2 (network + broadcast). |
| Subnet Mask | Dotted-decimal form of the prefix (e.g. 255.255.255.0 for /24). |
| Wildcard Mask | Bitwise inverse of the subnet mask; used in ACLs and OSPF. |
Common Subnet Reference
| CIDR | Subnet Mask | Usable Hosts | Typical Use |
|---|---|---|---|
| /30 | 255.255.255.252 | 2 | Point-to-point links |
| /29 | 255.255.255.248 | 6 | Small office LAN |
| /28 | 255.255.255.240 | 14 | VLAN segment |
| /27 | 255.255.255.224 | 30 | Small subnet |
| /24 | 255.255.255.0 | 254 | Standard LAN |
| /22 | 255.255.252.0 | 1022 | Medium network |
| /20 | 255.255.240.0 | 4094 | Large campus |
| /16 | 255.255.0.0 | 65 534 | Large organization |
| /8 | 255.0.0.0 | 16 777 214 | ISP / backbone |
Special Prefix Lengths
/32 (host route): A single host. Network address, broadcast, first host, and last host are all the same IP. Used in routing tables to advertise a specific host, and in firewall rules to match exactly one IP.
/31 (point-to-point, RFC 3021): Two addresses, both usable as host IPs — no separate network/broadcast. Used for router-to-router links where every address matters.
/0 (default route): Matches all IPv4 addresses. Used as the “catch-all” route (0.0.0.0/0) in routing tables to forward unmatched traffic to a default gateway.
Binary View Explained
The binary display shows each octet as 8 bits, separated by dots. For 192.168.1.0/24:
IP: 11000000.10101000.00000001.00000000
Mask: 11111111.11111111.11111111.00000000
|←── network bits (24) ──→|←hosts→|
The 1-bits in the mask mark the network portion; the 0-bits mark the host portion. Anything that falls outside the network bits can vary between .0 (network) and .255 (broadcast) for a /24.
Private IP Ranges (RFC 1918)
These ranges are reserved for private networks and are not routable on the public internet:
10.0.0.0/8— Class A private (16 million+ addresses)172.16.0.0/12— Class B private (1 million+ addresses)192.168.0.0/16— Class C private (65 000+ addresses)
Cloud providers and home routers carve subnets out of these ranges. Use this calculator to determine which sub-range to allocate to each VPC, VLAN, or office location.