IPv4 Prefix Calculator
Enter an IPv4 address and prefix length to calculate subnet details like network address, broadcast, host range, and mask.
What is an IP prefix calculator?
An IP prefix calculator is a networking tool that takes an IPv4 address and a CIDR prefix length (such as /24) and tells you exactly how that address fits inside a subnet. Instead of manually converting binary bits or doing decimal math, you get immediate answers for:
- Subnet mask and wildcard mask
- Network address and broadcast address
- First and last usable host addresses
- Total and usable host counts
Why this matters in real networks
Prefix math appears everywhere: home routers, cloud networking, firewall rules, VPN ranges, enterprise VLAN design, and troubleshooting connectivity issues. A small mistake in one prefix can lead to overlapping subnets, routing confusion, or unreachable services.
With a calculator, you can validate your assumptions in seconds. Whether you're creating a small office network or planning production infrastructure, accurate subnet boundaries are essential.
Understanding key outputs
Network address
The network address is the first IP in the subnet and identifies the subnet itself. Devices do not usually assign this address to hosts.
Broadcast address
The broadcast address is the last IP in the subnet and is used to send traffic to all hosts in that subnet (except in very specific modern use cases). It is usually not assignable.
Usable host range
In most IPv4 subnets, usable host addresses are between the network and broadcast addresses. For example, in a /24 network, you get 254 usable hosts.
Special prefixes: /31 and /32
- /31: commonly used on point-to-point links; both addresses can be usable.
- /32: a single-host route (exactly one address).
Quick examples
Example 1: 192.168.1.50/24
Subnet mask is 255.255.255.0. Network address becomes 192.168.1.0, broadcast is 192.168.1.255, and usable host range is 192.168.1.1 - 192.168.1.254.
Example 2: 10.10.8.200/20
A /20 means 4096 total addresses. The block size in the third octet is 16, so this IP falls in the 10.10.0.0/20 subnet.
Common CIDR prefixes at a glance
- /8 — very large private/public blocks
- /16 — common organizational subnet boundaries
- /24 — classic LAN size (256 total addresses)
- /28 — small segments (16 total addresses)
- /30 — traditional point-to-point subnet (4 total addresses)
- /31 — point-to-point optimized (2 total addresses)
- /32 — single host route
Best practices when planning subnets
- Leave growth room; avoid filling a subnet to 100% capacity.
- Document network purpose (users, servers, management, IoT, guest, etc.).
- Avoid overlapping prefixes across VPNs and cloud environments.
- Use consistent naming and IPAM records for long-term maintainability.
Final thoughts
IP addressing can look intimidating at first, but prefix logic becomes straightforward once you repeatedly map address + prefix to network boundaries. Use the calculator above to verify your subnet calculations instantly and reduce mistakes in both lab and production environments.