IPv4 CIDR Subnet Calculator
The problem: Manually calculating IP subnet masks, broadcast IPs, and host ranges for cloud VPCs and local networks leads to address collisions.
ASG Privacy VerifiedVerified
100% In-Browser Execution. Zero server uploads. Your data never leaves this tab — disconnect your internet and the tool keeps working.
IPv4 CIDR Subnet Calculator: the complete guide
An IPv4 CIDR (Classless Inter-Domain Routing) calculator computes network masks, broadcast addresses, usable IP address ranges, and host counts for any IPv4 address block. Whether you are provisioning VPC subnets in AWS, configuring firewall rules, setting up Kubernetes pod CIDRs, or segmenting local office networks, calculating subnet boundaries accurately prevents IP collisions and routing outages. This tool provides an interactive prefix slider and instantaneous bitwise calculation for all subnet sizes from /0 to /32.
Understanding Subnet Masks and Host Capacities
Every IPv4 address consists of 32 bits. The CIDR prefix (such as /24) specifies how many leading bits identify the network portion, leaving the remaining bits (32 - prefix) for host addresses. For a /24 network, 8 bits remain for hosts, yielding 2^8 = 256 total IP addresses. Subtracting the network ID (first address) and broadcast address (last address) leaves 254 usable host addresses.
Cloud Infrastructure and Subnet Allocation
Cloud providers like AWS, Google Cloud, and Azure allocate subnets using CIDR blocks. In AWS VPCs, 5 IP addresses per subnet are reserved for routing, DNS, and future use. Knowing your exact usable range before launching resources ensures subnets do not run out of capacity under auto-scaling conditions.
Step by step: how to use CIDR Calculator
- 1
Enter any valid IPv4 address and CIDR prefix (e.g. 192.168.1.0/24 or 10.0.0.0/16).
- 2
Drag the interactive prefix slider to test different subnet capacities in real time.
- 3
Inspect the calculated subnet mask, wildcard mask, and network/broadcast IPs.
- 4
Check the first and last usable host IP addresses.
- 5
Review the 32-bit binary representation to understand bitwise masking.
- 6
Copy the usable range or network parameters with the 1-click copy buttons.
Security & privacy
Network architecture and IP subnet plans are sensitive corporate data. This calculator performs all 32-bit bitwise calculations purely in JavaScript inside your browser. No IP addresses or CIDR blocks are sent over the network.