IPv4 Subnet Calculator
IPv6 Prefix Calculator
Equal-Size Subnet Generator
| # | Network | CIDR | First Host | Last Host | Broadcast | Usable Hosts |
|---|
VLSM Subnet Planner
| # | Requested Hosts | Network | CIDR | Mask | First Host | Last Host | Broadcast | Capacity |
|---|
IPv4 Binary Converter
Exports use the latest calculated or generated results.
Formula Used
| Calculation | Formula |
|---|---|
| Total IPv4 addresses | 2^(32 - CIDR) |
| Traditional usable hosts | 2^(32 - CIDR) - 2 |
| Network address | IP address AND subnet mask |
| Broadcast address | Network OR wildcard mask |
| Wildcard mask | 255.255.255.255 - subnet mask |
| VLSM block size | Smallest power of two covering required hosts plus reserved addresses |
How to Use This Calculator
- Enter an IPv4 address and CIDR prefix.
- Choose a calculation mode when planning capacity.
- Use the splitter for equal-size child networks.
- Use VLSM when subnet host demands differ.
- Open the IPv6 tab for prefix calculations.
- Download results as CSV or PDF when finished.
Subnetting Guide
Understanding Network Boundaries
Subnetting divides a larger IP network into smaller logical networks. Each subnet receives a network address and address range. IPv4 networks also normally reserve a broadcast address. The CIDR prefix determines how many bits identify the network. A larger prefix creates smaller networks with fewer host addresses. A smaller prefix creates larger networks with more addresses. Subnet masks express the same boundary using dotted decimal notation. For example, a /24 prefix equals 255.255.255.0. The remaining eight bits represent host addresses inside that network.
Planning Hosts and Subnets
Network planners usually begin with expected host counts and growth. Traditional IPv4 subnets reserve the first and last addresses. Therefore, host calculations often add two addresses before sizing. Point-to-point /31 networks are an important modern exception. They can use both available addresses on supported equipment. A /32 identifies one exact IPv4 address. Equal-size subnetting works well when departments need similar capacity. VLSM is better when different groups need different subnet sizes. VLSM assigns larger blocks first to prevent fragmentation. This tool sorts host requirements automatically before allocating address blocks.
IPv6 and Practical Network Design
IPv6 removes the broadcast address concept used by IPv4. Prefix lengths still separate network and interface portions. A /64 remains common for standard IPv6 LAN segments. IPv6 address counts can become extremely large. This calculator uses large integer arithmetic for accurate prefix ranges. It also identifies common address categories and special ranges. Binary displays can help students understand how masks create boundaries. Export functions make subnet plans easier to document and review. Always verify production designs against router and firewall requirements. Leave capacity for growth when allocating long-lived network ranges. Document gateway addresses before deployment to prevent configuration mistakes. Consistent naming also simplifies troubleshooting and future audits. Good subnet planning keeps networks efficient secure and scalable.
Common IPv4 CIDR Reference
| CIDR | Subnet Mask | Total Addresses | Usable Hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 (P2P) |
| /32 | 255.255.255.255 | 1 | 1 |
Frequently Asked Questions
What does a subnet calculator do?
It converts an IP address and prefix into network, broadcast, host range, subnet mask, wildcard mask, and related planning details.
What is CIDR notation?
CIDR writes a network prefix after a slash. For example, /24 means the first 24 bits identify the network.
How many usable hosts are in a /24 network?
A traditional IPv4 /24 contains 256 addresses and 254 usable host addresses after reserving network and broadcast addresses.
Does this calculator support /31 and /32 networks?
Yes. A /31 is treated as a point-to-point network with two usable addresses, while a /32 represents one exact address.
What is VLSM?
Variable Length Subnet Masking assigns different subnet sizes according to host demand, reducing wasted IPv4 address space.
Can I calculate IPv6 prefixes?
Yes. The IPv6 section expands and compresses addresses, calculates the network prefix, shows the range, and classifies common address types.
Can I export my subnet plan?
Yes. Results and generated subnet tables can be downloaded as CSV or PDF and can also be printed.