IPv4 Network Calculator
Enter an IPv4 address and CIDR prefix to calculate subnet details instantly.
Supports CIDR prefixes from /0 through /32.
What is a network calculator?
A network calculator is a tool that turns an IP address and subnet prefix into the practical details you need to configure routers, firewalls, switches, cloud security groups, and endpoint settings. Instead of manually converting binary values and counting host ranges, you can calculate everything in seconds: network address, broadcast address, subnet mask, wildcard mask, and valid host range.
This is especially useful when you are planning VLANs, writing ACL rules, troubleshooting connectivity, or validating whether two devices are in the same subnet.
Core networking terms (quick reference)
IP Address
An IPv4 address is a 32-bit number usually written in dotted decimal notation, such as 10.20.30.40. It identifies a host interface on a network.
CIDR Prefix
CIDR (Classless Inter-Domain Routing) indicates how many bits are used for the network portion of the address. For example, /24 means the first 24 bits are the network bits, leaving 8 bits for hosts.
Subnet Mask
The subnet mask is the dotted-decimal form of the prefix. A /24 prefix equals 255.255.255.0.
Broadcast Address
The broadcast address is the highest address in a subnet. Sending traffic to this address reaches all hosts in that subnet (where broadcast is supported).
Wildcard Mask
The wildcard mask is the inverse of the subnet mask and is commonly used in ACL configurations. For example, subnet mask 255.255.255.0 corresponds to wildcard 0.0.0.255.
How to use this network calculator
- Enter a valid IPv4 address in dotted decimal format (for example, 172.16.8.100).
- Enter a CIDR prefix between 0 and 32.
- Click Calculate Network to view all subnet details.
- Use the output to validate host assignment, routing boundaries, and firewall rules.
Why subnet calculation matters
Incorrect subnet math can cause overlapping routes, unreachable hosts, and security gaps. A few common real-world issues include assigning a gateway outside the host subnet, creating ACL entries with the wrong wildcard mask, and carving VLANs with overlapping ranges.
A reliable calculator helps you avoid these mistakes and speeds up design and troubleshooting work in enterprise, campus, and cloud networks.
Common CIDR sizes
| CIDR | Subnet Mask | Total Addresses | Typical Use |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | Small LAN segment |
| /26 | 255.255.255.192 | 64 | Department VLAN |
| /30 | 255.255.255.252 | 4 | Legacy point-to-point links |
| /31 | 255.255.255.254 | 2 | Modern point-to-point links |
| /32 | 255.255.255.255 | 1 | Loopback / host route |
Best practices for subnet planning
- Leave room for growth rather than creating tightly packed address pools.
- Use consistent subnet sizes for similar environments where possible.
- Document network, broadcast, gateway, and DHCP ranges for every subnet.
- Reserve management and infrastructure IP space intentionally.
- Validate ACL wildcard masks before deployment.
Final thoughts
Whether you are studying for a networking certification, managing production infrastructure, or building a home lab, fast and accurate subnet calculations are foundational skills. Use this calculator to remove manual errors and focus on architecture, security, and reliability.