CIDR Subnet Calculator

Break down any IPv4 address block into its network address, broadcast address, usable host range, and total host count. Instant, client-side, no signup.

/24
Total Usable Hosts
254
256 total IP addresses in block
Large Broadcast Domain - consider subnetting to reduce broadcast storm risk
Network Address
192.168.1.0
Broadcast Address
192.168.1.255
Subnet Mask
255.255.255.0
Wildcard Mask
0.0.0.255
Usable IP Range
192.168.1.1 - 192.168.1.254
Binary Breakdown
IP Address
Subnet Mask
Network Addr
Key Terms Explained
CIDR
Classless Inter-Domain Routing. A flexible method for allocating IP addresses and routing using a prefix length (e.g. /24) instead of fixed class boundaries.
Subnet Mask
A 32-bit number (e.g. 255.255.255.0) that divides an IP address into its network and host portions by masking with 1s for network bits and 0s for host bits.
Network Address
The lowest IP in a subnet, used to identify the network itself. Calculated by a bitwise AND of the IP and the subnet mask. Cannot be assigned to a host.
Broadcast Address
The highest IP in a subnet. Packets sent to this address reach all hosts simultaneously within the subnet. Cannot be assigned to a host.
Wildcard Mask
The bitwise inverse of the subnet mask. Used in Cisco ACLs, OSPF, and firewall rules. Calculated by subtracting each octet of the subnet mask from 255.
IPv4 vs IPv6
IPv4 uses 32-bit dotted-decimal addresses (about 4.3 billion total). IPv6 uses 128-bit hexadecimal addresses, virtually unlimited. This calculator covers IPv4 only.
Octet
One of the four 8-bit groups in an IPv4 address, separated by dots. Each octet ranges from 0 to 255, representing 8 binary bits.
Broadcast Domain
The set of all hosts that will receive a broadcast packet. Large domains (small CIDR prefix, e.g. /8) can create broadcast storms if traffic spikes.

The Complete Guide to CIDR Subnetting

Whether you are designing a VPC in AWS, segmenting an on-prem network, or writing firewall ACLs, understanding CIDR notation and subnetting math is a core skill for any network engineer, sysadmin, or DevOps practitioner. This guide explains how the numbers work so you can subnet confidently without memorizing tables.

How to Use This Calculator

Enter any IPv4 address in the top field (e.g. 10.0.0.0) and adjust the CIDR prefix slider or type a prefix length (1-32). The subnet mask dropdown and prefix fields are two-way bound: changing one updates the others instantly. Results appear in real time with no button press needed.

The binary breakdown panel below the results shows exactly which bits belong to the network portion (green ones) and which belong to the host portion, making the bitwise AND operation that computes the Network Address visually obvious.

How Subnet Math Works

Every IPv4 address is a 32-bit integer. The CIDR prefix (e.g. /24) tells you how many leading bits identify the network. A /24 produces a subnet mask of 24 ones followed by 8 zeros, which in decimal is 255.255.255.0.

Choosing the Right Prefix Size

For cloud VPCs, a /16 gives 65,534 usable hosts - large enough to subdivide further into application tiers. A /24 (254 hosts) is a common workload subnet. A /28 (14 hosts) suits small services like NAT gateways or load balancers. Going smaller than /28 is rare but valid.

For point-to-point router links, use /30 (2 usable hosts) or /31 per RFC 3021 (2 IPs, both usable). Use /32 as a host route for loopback addresses or precise BGP advertisements.

RFC 1918 Private Ranges to Know

Broadcast Storm Risk at Large Prefix Sizes

When a single subnet contains tens of thousands of hosts (e.g. /8 or /12), every broadcast packet - ARP requests, DHCP, routing updates - is delivered to every device simultaneously. This can saturate links and CPU cycles in a broadcast storm. The calculator flags subnets above a threshold with a warning badge to prompt you to consider further segmentation using VLANs or smaller subnets.

Frequently Asked Questions

Why do standard subnets lose two IP addresses? +
Every subnet reserves its lowest address as the Network Address (used to identify the subnet itself) and its highest address as the Broadcast Address (used to reach all hosts simultaneously). Neither can be assigned to a device, so usable hosts equal the total IP count minus two.
What are /31 and /32 subnets used for? +
A /31 subnet contains exactly two IP addresses and is used for point-to-point links between two routers (per RFC 3021), where both addresses are usable - no network or broadcast reservation applies. A /32 is a host route representing a single specific IP address, commonly used for loopback interfaces, policy routing, or advertising a precise host in BGP.
How do I calculate a wildcard mask from a subnet mask? +
Subtract each octet of the subnet mask from 255. For example, 255.255.255.0 becomes 0.0.0.255. The wildcard mask is the bitwise inverse of the subnet mask and is used in Cisco ACLs and OSPF configurations to define which bits must match.
What are the private IP address ranges (RFC 1918)? +
RFC 1918 defines three private (non-routable) IPv4 ranges: 10.0.0.0/8 (Class A, over 16 million addresses), 172.16.0.0/12 (Class B, about 1 million addresses), and 192.168.0.0/16 (Class C, 65,536 addresses). These are used for internal networks and are never routed on the public internet.
What is the difference between IPv4 and IPv6? +
IPv4 uses 32-bit addresses written in dotted-decimal notation (e.g. 192.168.1.0), supporting about 4.3 billion unique addresses. IPv6 uses 128-bit addresses in hexadecimal colon notation (e.g. 2001:db8::1), supporting approximately 340 undecillion addresses. This calculator handles IPv4 only.