Subnet Calculator: CIDR/IPv4 Range & Host Calculator Online
Subnet calculator online: calculate CIDR notation, IP ranges, subnet masks, and usable hosts for IPv4 networks, with classful breakdown.
Updated 2026-08-16
Related Tools
IP Address Lookup: Online Geolocation, ISP & ASN Info
DNS Lookup: All 16 Record Types (A, AAAA, MX, SRV)
HTTP Headers Viewer: Analyze & Audit Response Headers
Ping & Traceroute: Test Network Latency & Server Uptime
Port Scanner Online: Check Open Ports & Common Services
SSL/TLS Certificate Checker: Verify & Analyze Online
Features
- Calculate network address, broadcast address, and usable host range from any IPv4 CIDR notation
- Compare two subnets to detect overlap, containment, or complete separation
- VLSM (Variable Length Subnet Mask) calculator: split a network into subnets of different sizes
- Instant subnet mask and wildcard mask generation for prefix lengths /0 through /32
- Visual binary breakdown: the IP address and subnet mask shown side by side in binary format with the network/host boundary clearly marked, so bit boundaries are easy to visualize
- Built-in CIDR reference table showing all 33 prefix lengths with their subnet masks and host capacities
- IPv4 network class detection (Class A, B, C, D, E) and private IP range identification (RFC 1918)
- Support for all standard subnet sizes from /32 (single host) to /0 (entire IPv4 space)
- Handles edge cases like /31 (point-to-point) and /32 (single host) correctly
- Copy any calculated field (network address, broadcast address, usable range, subnet mask, or the entire result table) individually to clipboard with one click
- Works offline after first load
How to Use
- 1Enter an IPv4 address and CIDR prefix to calculate network details.
- 2Switch to the Compare tab to check if two subnets overlap, contain each other, or are separate.
- 3Switch to the VLSM tab to split a network block into multiple subnets of different sizes.
- 4In VLSM mode, add subnet requirements with names and required host counts, then click Calculate.
- 5Review the results: allocated subnets, remaining space, and any wasted addresses.
- 6Use the CIDR reference table below to look up common prefix lengths and their host capacities.
- 7Use the binary representation view to understand how the subnet mask separates the network and host portions, helpful for CCNA/network exam preparation
- 8Export the subnet plan as formatted text after VLSM calculation; copy the allocation table to document your network design for team review
Frequently Asked Questions
What is CIDR notation and how does it work?
CIDR (Classless Inter-Domain Routing) notation represents an IP address and its subnet prefix length using the format IP/prefix (e.g., 192.168.1.0/24). The prefix length indicates how many bits of the address are the network portion. The remaining bits identify hosts within that network. /24 means the first 24 bits are the network, leaving 8 bits (256 addresses) for hosts.
Why does a /24 subnet have 254 usable hosts instead of 256?
In every subnet, two addresses are reserved: the network address (all host bits set to 0) and the broadcast address (all host bits set to 1). For a /24 network, 256 - 2 = 254 usable addresses. The exception is /31 (2 addresses = point-to-point link, no broadcast needed) and /32 (1 address = single host).
What is the difference between total hosts and usable hosts?
Total hosts is the number of all IP addresses in the subnet (2^(32 - prefix)). Usable hosts excludes the network address and broadcast address, leaving addresses assignable to devices. For /31 and /32, all addresses are usable.
What are private IP ranges and why do they matter?
Private IP ranges (RFC 1918) are reserved for internal networks and are not routable on the public internet: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. The tool automatically flags when an IP falls in a private range.
Why does my subnet calculator show an IP range that overlaps another subnet?
Overlap almost always means the prefix or the start address was entered wrong: 192.168.1.0/24 and 192.168.1.128/25 overlap because the second block sits inside the first. Run both through the tool's compare feature (it reports identical/contains/overlap/separate) before deploying, and remember VLSM blocks must align to their network boundaries; a /25 cannot start at .200. Rewrite the plan with the smallest prefix that fits each segment.
How does the VLSM calculator work?
VLSM (Variable Length Subnet Masking) divides a network block into subnets of different sizes to minimize waste. Enter your base CIDR block (e.g., 192.168.1.0/24) and add requirements with names and needed host counts. The tool sorts requirements largest-first, finds the smallest prefix that fits each, aligns to network boundaries, and allocates sequentially. Remaining space is reported at the end.
Why is my subnet calculator online result different from my network admin's tool?
Most tools agree on the numbers but differ in presentation: some show total hosts (256 for a /24) while others show usable hosts (254), and some display the wildcard mask or the network class where others do not. A real difference appears when one tool assumes classful boundaries or treats /31 and /32 host counts differently. Compare the prefix length and the usable-host formula (2^(32-prefix) - 2); if those match, the results are the same answer with different labels.
Can this calculator handle IPv6 subnets?
No. This tool works with IPv4 only, and it says so honestly rather than returning a wrong IPv6 result. For IPv6 subnetting, use a dedicated IPv6 calculator or ipcalc/sipcalc on Linux; the prefix-length math is the same, but the address format and host-counting rules differ.
How do I avoid wasting addresses when dividing a network into subnets?
Enter each segment's real host count in the VLSM tab instead of rounding up to a round number. For example, splitting a /24 into a /25 (126 usable hosts) plus two /26s (62 each) uses the whole block with almost no waste, while three equal /26s would leave 64 addresses unused. Plan on paper first: list each segment's headcount, pick the smallest prefix that fits each, and sum the addresses to confirm the total fits inside your base block.
How do I calculate how many hosts a subnet can support?
The number of usable hosts in a subnet is 2^(32 - prefix) - 2. For example: /24 gives 2^8 - 2 = 254 usable hosts, /28 gives 2^4 - 2 = 14 usable hosts, /30 gives 2^2 - 2 = 2 usable hosts (point-to-point). The tool automatically calculates this for any CIDR you enter. Remember to subtract 2 for network and broadcast addresses, except for /31 (2 usable, no broadcast) and /32 (1 usable, single host).
What is the difference between subnetting and VLSM?
Traditional subnetting (classful) divides a network into equal-sized subnets using the same prefix length, which wastes addresses when different subnets need different numbers of hosts. VLSM (Variable Length Subnet Mask) divides a network into subnets of different sizes, allocating exactly the number of addresses each subnet needs. VLSM is the modern standard and is used by real-world network designs. The tool's VLSM calculator automatically sorts requirements by size and allocates the most efficient subnets.