IPv4 Subnet & CIDR Prefix Calculator
Network engineering IP subnet calculator. Input any IPv4 address with CIDR prefix to determine network ID, broadcast address, subnet mask, usable host IP range, and RFC 1918 private network classification.
What is the IPv4 Subnet & CIDR Prefix Calculator?
This tool calculates network addresses, broadcast addresses, usable host ranges, and wildcard masks from an IPv4 address and CIDR prefix length.
Classless Inter-Domain Routing (CIDR) Bitwise Arithmetic
An IPv4 address consists of 32 bits divided into 4 octets. The subnet mask determines where the network prefix ends and the host identifier begins. The network address is calculated via bitwise AND: $\text{Network} = \text{IP} \ \& \ \text{Mask}$. The broadcast address is obtained by setting all host bits to 1: $\text{Broadcast} = \text{Network} \ | \ (\sim\text{Mask})$. Usable hosts are total addresses minus 2 (network and broadcast).
How to Use the IPv4 Subnet & CIDR Prefix Calculator
Enter IPv4 Address
Type any valid IPv4 address (e.g. 10.0.0.1 or 172.16.20.5).
Select Subnet Mask / CIDR
Choose your CIDR prefix (/8 to /32) from the dropdown or type the dotted-decimal subnet mask.
Review Subnet Allocation
Instantly view the Network ID, usable host IP range, broadcast address, and total usable host count.
Key Settings & Parameters
| Setting | What It Controls | Recommended Default |
|---|---|---|
| CIDR Prefix (/8 to /32) | Controls subnet size. Common prefixes: /24 (254 hosts), /26 (62 hosts), /28 (14 hosts), /30 (2 hosts for point-to-point). | /24 for office LANs, /28 for small DMZs |
Common Pitfalls to Avoid
-
• Assigning the network address or broadcast address to a host deviceThe first address (host bits all 0) is reserved for the network ID, and the last address (host bits all 1) is reserved for broadcast.
-
• Overlapping CIDR blocks in cloud VPC peeringEnsure peering VPCs have non-overlapping IP address spaces before creating route tables.
Pro Tips for Best Results
- Remember the powers of 2 for host bits: /24 = 254 usable, /25 = 126, /26 = 62, /27 = 30, /28 = 14, /29 = 6, /30 = 2.
Local Processing Guarantee
Zero server communication. Internal corporate IP schemes and private cloud topologies are never sent across the internet.
When to Use
- Designing AWS VPC, Azure VNet, or Google Cloud subnet topologies without overlapping CIDR blocks.
- Configuring enterprise router interfaces, VLAN boundaries, and DHCP scopes.
- Preparing for Cisco CCNA/CCNP, CompTIA Network+, or AWS Certified Advanced Networking exams.
- • Valid only for IPv4 dotted-decimal notation. Prefix lengths must be between 0 and 32.