Subnet Calculator

Calculate IPv4 and IPv6 networks with CIDR masks host ranges subnet planning VLSM binary details address classification and downloadable reports for faster network design

IPv4 Subnet Calculator

IPv6 Prefix Calculator

Equal-Size Subnet Generator

#NetworkCIDRFirst HostLast HostBroadcastUsable Hosts

VLSM Subnet Planner

#Requested HostsNetworkCIDRMaskFirst HostLast HostBroadcastCapacity

IPv4 Binary Converter


Exports use the latest calculated or generated results.

Formula Used

CalculationFormula
Total IPv4 addresses2^(32 - CIDR)
Traditional usable hosts2^(32 - CIDR) - 2
Network addressIP address AND subnet mask
Broadcast addressNetwork OR wildcard mask
Wildcard mask255.255.255.255 - subnet mask
VLSM block sizeSmallest power of two covering required hosts plus reserved addresses

How to Use This Calculator

  1. Enter an IPv4 address and CIDR prefix.
  2. Choose a calculation mode when planning capacity.
  3. Use the splitter for equal-size child networks.
  4. Use VLSM when subnet host demands differ.
  5. Open the IPv6 tab for prefix calculations.
  6. 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

CIDRSubnet MaskTotal AddressesUsable 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.


Related Calculators

IP Subnetting Cheat Sheet GeneratorNetwork Diagram GeneratorFirewall Rule GeneratorBandwidth CalculatorServer Uptime CalculatorPort Number Lookup ToolNetwork Troubleshooting Checklist GeneratorIT Asset Inventory GeneratorHelpdesk Ticket Template GeneratorSLA Uptime Calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.