XConvert
Downloads
Pricing

Subnet Calculator Online

Enter an IP address and CIDR prefix to instantly calculate network, broadcast, subnet mask, and usable host range.

Splits the parent into N equal-size /M blocks where M = parentBits + ceil(log₂ N).

Subnet #1192.168.1.0/26
Range192.168.1.1 – 192.168.1.62
Broadcast192.168.1.63
Usable hosts62
Subnet #2192.168.1.64/26
Range192.168.1.65 – 192.168.1.126
Broadcast192.168.1.127
Usable hosts62
Subnet #3192.168.1.128/26
Range192.168.1.129 – 192.168.1.190
Broadcast192.168.1.191
Usable hosts62
Subnet #4192.168.1.192/26
Range192.168.1.193 – 192.168.1.254
Broadcast192.168.1.255
Usable hosts62

How to Use the Subnet Calculator

  1. Enter a Parent CIDR: Type any IPv4 address with prefix length in the Parent CIDR field — 192.168.1.0/24, 10.0.0.0/16, 172.16.0.0/12, or any other valid block. The calculator accepts hosts within the block (192.168.1.50/24) and normalizes them to the network address (192.168.1.0/24).
  2. Set the Number of Equal Subnets: Enter a value between 2 and 64 in the Number of equal subnets field. The tool splits the parent into N equal-size blocks where the new prefix is parentBits + ceil(log2 N) — so splitting a /24 into 4 subnets produces four /26 blocks, and splitting into 8 produces eight /27 blocks.
  3. Read the Results: Each subnet card shows its CIDR notation, host range (first usable to last usable), broadcast address, and usable host count. The tool follows RFC 3021 — /31 blocks return 2 usable hosts (point-to-point links), while /30 and shorter prefixes subtract the network and broadcast addresses from the host count.
  4. Copy Into Your Network Plan: Use the generated ranges to assign DHCP scopes, VLAN allocations, ACL entries, or firewall rules. All computation runs in your browser — no IP plan ever leaves your machine.

Why Use a Subnet Calculator?

Subnetting by hand means converting decimal octets to binary, applying the bitmask, computing 2^(32-prefix), and subtracting reserved addresses for each block. One arithmetic slip and your DHCP scope overlaps a server VLAN. A calculator eliminates that risk and lets you plan an address space in seconds rather than minutes.

  • Splitting a /24 across departments — Carve 192.168.1.0/24 into four /26 blocks for Sales, Engineering, Finance, and Guests. Each block gives 62 usable hosts, isolating broadcast domains while staying inside one IANA-sized allocation.
  • Planning a /16 corporate network — A /16 holds 65,534 usable hosts, more than any single Layer-2 segment should ever carry. Splitting into 256 /24s or 64 /22s aligns subnet boundaries with floor, building, or site naming for cleaner routing tables.
  • Point-to-point WAN links — Service provider router pairs use /30 (4 addresses, 2 usable) or /31 per RFC 3021 (2 addresses, both usable, no broadcast). A 1,000-link backbone saves 2,000 addresses by switching from /30 to /31.
  • AWS VPC and Azure VNet design — Cloud providers require you to specify subnet CIDRs at creation, and AWS reserves 5 addresses per subnet (first 4 + broadcast) instead of the usual 2. Sizing a /28 in AWS leaves only 11 usable IPs — splitting a parent /20 into the right number of /24s up front prevents painful re-tenanting later.
  • Container and Kubernetes pod ranges — Kubernetes default pod CIDR is often 10.244.0.0/16 (Flannel) or 192.168.0.0/16 (Calico), then split per-node into /24 pod blocks. Subnetting in advance avoids node-CIDR collisions when clusters grow past 256 nodes.
  • VLSM allocation — Variable-Length Subnet Masking lets a single allocated block hold subnets of different sizes. Use this calculator iteratively: split the parent once, then re-enter the largest child as a new parent to subdivide it further for a leaf segment.

CIDR Quick Reference (/8 through /32)

Prefix Subnet Mask Total Addresses Usable Hosts Typical Use
/8 255.0.0.0 16,777,216 16,777,214 Legacy Class A; ISP allocations
/12 255.240.0.0 1,048,576 1,048,574 RFC 1918 172.16.0.0/12 block
/16 255.255.0.0 65,536 65,534 Corporate site; RFC 1918 192.168.0.0/16
/20 255.255.240.0 4,096 4,094 Building or campus segment
/22 255.255.252.0 1,024 1,022 Large department / multi-VLAN
/24 255.255.255.0 256 254 Standard LAN segment
/25 255.255.255.128 128 126 Half-LAN split
/26 255.255.255.192 64 62 Department subnet
/27 255.255.255.224 32 30 Small office / VoIP VLAN
/28 255.255.255.240 16 14 Server cluster; AWS minimum
/29 255.255.255.248 8 6 Small DMZ; switch management
/30 255.255.255.252 4 2 Point-to-point router link
/31 255.255.255.254 2 2 P2P link per RFC 3021
/32 255.255.255.255 1 1 Host route / loopback

IPv4 vs IPv6 Subnetting

Property IPv4 IPv6
Address size 32 bits 128 bits
Standard LAN prefix /24 (254 usable) /64 (~18 quintillion)
Smallest assignable LAN /24 (or smaller for P2P) /64 — de facto SLAAC standard (RFC 7421)
Network address reserved? Yes (first address) No — fully usable
Broadcast address reserved? Yes (last address) No — IPv6 has no broadcast; uses multicast
Usable hosts per /24 or /64 254 2^64 (no minus-2 rule)
Typical site allocation /24 to /16 (RFC 1918) /48 per site, /56 per residence
Wildcard mask in ACLs Common (Cisco IOS) Rare — IPv6 ACLs use prefix-length

Frequently Asked Questions

Why does a /24 have 256 addresses but only 254 usable hosts?

A /24 reserves the first address as the network address (192.168.1.0) and the last as the directed broadcast (192.168.1.255). RFC 950 set this convention in 1985 — the network address identifies the subnet itself in routing tables, and the broadcast lets you address every host on the segment with one packet. Subtracting those two leaves 254 host addresses. The formula 2^(32-prefix) - 2 works for any IPv4 prefix from /1 to /30. For /31 (RFC 3021) and /32 the rule changes — see below.

What is a wildcard mask and how is it different from a subnet mask?

A wildcard mask is the bitwise inverse of a subnet mask: where the subnet mask has a 1, the wildcard has a 0, and vice versa. Subnet mask 255.255.255.0 becomes wildcard 0.0.0.255. Cisco IOS uses wildcard masks in standard and extended ACLs, OSPF network statements, and route-map match ip address clauses. Wildcards also allow non-contiguous matching that subnet masks cannot express — 0.0.255.0 matches "anything in the third octet, exact match elsewhere," which is useful for matching every Nth address across a range. Most other vendors (Juniper, Arista, Linux iptables) use prefix-length or subnet-mask notation instead.

What's the difference between VLSM and FLSM?

FLSM (Fixed-Length Subnet Masking) divides a parent block into equal-size subnets — splitting 10.0.0.0/16 into 256 /24s, for example. Every subnet has the same prefix length. VLSM (Variable-Length Subnet Masking) allows subnets of different sizes within the same parent. You might carve 10.0.0.0/16 into a /20 for the data center, a /22 for user LANs, and several /30s for WAN links. VLSM is the modern standard — it's enabled by CIDR (RFC 4632) and supported by every classless routing protocol (OSPF, EIGRP, BGP, IS-IS). Classful protocols like RIPv1 don't carry prefix length in updates, which is why they can't handle VLSM. This XConvert tool performs FLSM in one step; to do VLSM, split iteratively — partition the parent, then re-enter the largest child as a new parent and subdivide it.

What is a /31 subnet used for?

Per RFC 3021 (published December 2000), a /31 prefix is legal on point-to-point links. Because P2P links have only two endpoints and no shared broadcast medium, the network and broadcast addresses are unnecessary — both /31 addresses become usable host addresses. A backbone with 1,000 router-to-router links saves 2,000 IPv4 addresses by using /31 instead of /30. All major router vendors (Cisco IOS/XR/NX-OS, Juniper Junos, Arista EOS) support /31 on point-to-point interfaces. Note that some older Windows versions historically had issues with /31 static assignments — modern Windows Server 2019+ handles it correctly on routed interfaces, though it remains unusual outside of routers.

How does NAT relate to subnetting?

Network Address Translation lets multiple devices on a private subnet share one public IP. Inside a typical home network, devices live on 192.168.1.0/24 (an RFC 1918 range), and the router's WAN interface holds a single public IPv4 address from the ISP. The router maintains a translation table mapping (internal IP, internal port) to (public IP, external port) so return traffic finds the right device. Subnetting and NAT are independent concerns — you size the internal subnet to fit your devices regardless of how many public IPs you have. The IPv4 exhaustion problem is the reason NAT exists at all: with only ~3.7 billion routable IPv4 addresses, RFC 1918 + NAT lets organizations operate millions of internal devices behind a small public allocation.

What are the RFC 1918 private address ranges?

RFC 1918 reserves three IPv4 blocks for private internets that public routers must not forward: 10.0.0.0/8 (16,777,216 addresses), 172.16.0.0/12 (1,048,576 addresses, covering 172.16.0.0 through 172.31.255.255), and 192.168.0.0/16 (65,536 addresses). Home routers default to a /24 carved from the 192.168 block. Enterprises typically use the 10/8 block because its size accommodates aggressive subnetting across many sites. The 172.16/12 block is the least used but works the same way. Three additional ranges are RFC-reserved but commonly miscalled "private": 100.64.0.0/10 (RFC 6598, carrier-grade NAT), 169.254.0.0/16 (link-local), and 127.0.0.0/8 (loopback).

What is the difference between CIDR notation and a dotted-decimal subnet mask?

They express the same information. /24 means "the first 24 bits are the network portion," which is equivalent to the mask 255.255.255.0 (binary 11111111.11111111.11111111.00000000 — 24 ones followed by 8 zeros). CIDR notation was standardized by RFC 4632 in 2006 (updating RFC 1519 from 1993) and is now the preferred form because it's compact and routing-protocol native. Older configuration syntax (Windows ipconfig, some VPN clients, older Cisco IOS commands) still uses dotted-decimal masks. To convert mentally: every 8 contiguous one-bits adds one to the octet column — /8 = 255.0.0.0, /16 = 255.255.0.0, /24 = 255.255.255.0. For non-octet boundaries, the partial octet follows the pattern 128, 192, 224, 240, 248, 252, 254, 255 for 1-8 bits set.

Can this calculator do reverse subnet lookups (find the network from an arbitrary IP)?

Yes. Enter any host address with the prefix length — 192.168.1.50/24 — and the calculator normalizes to the network address 192.168.1.0/24 and returns the same subnet info you'd get from entering 192.168.1.0/24 directly. This is the same operation routers perform in their longest-prefix-match lookups. To convert the result to binary octets for a visual check of which bits are network vs host, try the Number Base Converter. For other network admin utilities, the Chmod Calculator handles Unix file permissions and the Aspect Ratio Calculator helps with display geometry.

Does the calculator support IPv6?

This tool is IPv4-only. IPv6 subnetting follows different conventions — /64 is the de facto standard LAN prefix because Ethernet link-layer specs require a 64-bit interface identifier for SLAAC (RFC 7421 analyzes the boundary), there is no broadcast address, and the address space is large enough that the "minus 2 usable" rule doesn't apply. If you need IPv6 calculations, several dedicated tools handle prefix delegation (/48 to /56 to /64) and EUI-64 host portions; IPv4 and IPv6 are distinct enough that conflating them in one calculator usually causes more confusion than it saves.

Related Calculate tools
Cidr CalculatorBmi CalculatorBmr CalculatorTdee CalculatorBody Fat CalculatorCalorie CalculatorDue Date CalculatorPercentage Calculator

Image Tools

Image CompressorCompress JPEGCompress PNGCompress GIFCompress WebPImage ConverterJPG ConverterImage Resizer

Video Tools

Video CompressorCompress MP4MP4 to GIFVideo to GIFVideo ConverterMP4 ConverterVideo Cutter

Audio Tools

Audio CompressorCompress MP3Compress WAVAudio ConverterMP3 ConverterFLAC to MP3Audio Cutter

Document Tools

Compress PDFMerge Images to PDFSplit PDFPDF to JPGUnzip FilesRAR Extractor

Converters

Time Zone ConverterMeeting PlannerIST to ESTTime Zone AbbreviationsUnit ConverterLength ConverterFlow Rate Converter
© 2026 XConvert.com. All Rights Reserved.
About UsPrivacy PolicyTerms of ServiceContactHelp Us Grow