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).
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).parentBits + ceil(log2 N) — so splitting a /24 into 4 subnets produces four /26 blocks, and splitting into 8 produces eight /27 blocks.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.
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.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.| 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 |
| 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 |
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.
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.
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.
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.
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.
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).
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.
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.
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.