Technology & IT

๐ŸŒ

IP Subnet Calculator: CIDR, Mask & Host Range

Calculate IP ranges, subnet masks, and usable hosts. Visual binary breakdown and cheat sheet.

Version
๐ŸŒ

Subnet Calculator

/24
IP Address (Binary)
11000000ยท10101000ยท00000001ยท00000000
Subnet Mask (Binary)

1s = Network bits (blue), 0s = Host bits (green). A /24 uses exactly 3 octets.

11111111ยท11111111ยท11111111ยท00000000

Information Hub

What Is a Subnet?

Think of the internet like a city. The network portion identifies the streetโ€”routers use it to reach the right neighborhood. The host portion is the house number.

A /24 gives you 256 addresses; a /16 gives you 65,536. The CIDR number shows where network ends and host begins.

CIDR Explained

Why /24 instead of 255.255.255.0? Same thing. The dotted-decimal mask means the first 24 bits are network. CIDR condenses that to /24.

CIDR is shorter and works across all mask lengths. Common in firewalls, AWS security groups, and router configs.

The Reserved IPs

Why subtract 2? The network address (all host bits 0) and broadcast address (all host bits 1) are reserved.

Usable hosts = 2host_bits โˆ’ 2.

Typical Subnets

Click a row to apply that prefix to the calculator. Search by prefix (/24), mask, or hosts (e.g. 500).

PrefixSubnet MaskUsable Hosts
/8255.0.0.016,777,214
/9255.128.0.08,388,606
/10255.192.0.04,194,302
/11255.224.0.02,097,150
/12255.240.0.01,048,574
/13255.248.0.0524,286
/14255.252.0.0262,142
/15255.254.0.0131,070
/16255.255.0.065,534
/17255.255.128.032,766
/18255.255.192.016,382
/19255.255.224.08,190
/20255.255.240.04,094
/21255.255.248.02,046
/22255.255.252.01,022
/23255.255.254.0510
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522
/31255.255.255.2542
/32255.255.255.2550

Subnetting: Network vs Host, IPv4 vs IPv6

Every IP address has two parts: the network prefix (where it lives) and the host portion (which device). Subnet masks and CIDR define the boundary. Here is how the math works and why /24 and /64 show up everywhere.

Core Concepts

Network address

The "start" of a subnetโ€”all host bits are 0. Routers use it to identify the subnet. 192.168.1.0/24 has network address 192.168.1.0.

Broadcast address

The "shout" addressโ€”all host bits are 1. Packets sent here reach every host on the subnet. In 192.168.1.0/24, broadcast is 192.168.1.255.

CIDR notation

/24 means 24 network bits. Shorter to type than 255.255.255.0. Works for any prefix lengthโ€”/8 through /32 for IPv4, /8 through /128 for IPv6.

Usable range

First usable = network + 1. Last usable = broadcast โˆ’ 1. Total usable = 2(32โˆ’n)โˆ’22^{(32-n)} - 2 for IPv4. IPv6 has no broadcast, so all addresses in the range are usable.

IP Subnet Calculator: CIDR, Mask, Host Range & IPv6

Calculate IPv4 and IPv6 subnets: network address, broadcast, usable host range, and prefix info. Binary visualizer, cheat sheet, and CIDR converter. Free subnet calculator for engineers.

What This Tool Does

IPv4: Enter an IP and CIDRโ€”get network address, broadcast, usable host range, and total hosts. A binary visualizer shows network vs host bits. A cheat sheet lists typical prefixes (/8 through /32) with one click to apply. IPv6: Enter an address and prefixโ€”get expanded/compressed format, network address, IP range, and total addresses. Hextet cards color-code Global Routing Prefix, Subnet ID, and Interface ID.

IPv4: Why We Subtract 2

Two addresses in every IPv4 subnet are reserved. The network address (host bits = 0) identifies the subnet. The broadcast address (host bits = 1) delivers to every host. So usable hosts = 2(32โˆ’n)โˆ’22^{(32-n)} - 2. A /24 has 256 total addresses but only 254 you can assign to devices.

IPv6: The Unimaginable Scale

IPv6 has 2128 addressesโ€”roughly 340 undecillion. A /64 gives 264 addresses (18,446,744,073,709,551,616) per subnet. No broadcast, no NAT for scaling. Common prefixes: /48 for enterprise (65,536 subnets), /56 for residential (256 subnets), /64 for a single link. The :: compresses consecutive zeros but can appear only once per address.

Hex Breakdown: GRP, Subnet ID, Interface ID

For /64: hextets 0-2 (bits 0-47) are the Global Routing Prefix. Hextet 3 (bits 48-63) is the Subnet ID. Hextets 4-7 (bits 64-127) are the Interface ID. The tool updates colors dynamically as you change the prefix. IPv6 uses hexadecimal: 0-9 and A-F (10-15).

IP Subnet Calculator FAQ

? What is a subnet mask and how does CIDR relate to it?

A subnet mask marks which bits are network (1) vs host (0). CIDR condenses it: /24 means the first 24 bits are network. 255.255.255.0255.255.255.0 in dotted-decimal is the same as /24โ€”both mean 24 network bits, 8 host bits. Usable hosts = 2(32โˆ’n)โˆ’22^{(32-n)} - 2 for IPv4 (network and broadcast addresses are reserved).

? Why does my subnet only have 254 usable hosts when it holds 256 addresses?

Two addresses in every subnet are reserved: the network address (all host bits 0) and the broadcast address (all host bits 1). You can't assign those to devices. So a /24 has 256 total addresses but only 254 usable for hosts. The formula always subtracts 2 for IPv4 subnets.

? What's the difference between IPv4 and IPv6 subnetting?

IPv4 uses 32 bits; IPv6 uses 128. IPv4 typically reserves 2 addresses (network + broadcast). IPv6 has no broadcastโ€”it uses multicast. A standard IPv6 /64 gives 2โถโด addresses (18 quintillion) per subnet. No NAT neededโ€”the address space is enormous.

? When should I use /48, /56, or /64 for IPv6?

/48 is common for enterprise sitesโ€”you get 65,536 /64 subnets. /56 is typical for residential ISP assignmentsโ€”256 subnets. /64 is the standard for a single LAN or link. Most devices expect a /64; going smaller can break SLAAC and some features.

? How do I interpret the binary visualizer for the subnet mask?

The 1s (blue) are network bits; the 0s (green) are host bits. A /24 mask has 24 ones followed by 8 zerosโ€”exactly 3 octets of network. The split shows where the "street address" ends and the "house number" begins. Same logic applies to IPv6 hextets.
๐Ÿ’ก
Mathematical Reference Note

Calculation Logic: This tool uses standard mathematical algorithms. While we strive for accuracy, errors in logic or user input can result in incorrect data.

Verification: Results should be cross-checked if used for important academic, professional, or personal calculations.

Standard Terms: This tool is provided free of charge and as-is. CalcRegistry provides no warranty regarding the accuracy or fitness of these results for your specific needs.

ยฉ 2026 CalcRegistry Reference Last System Check: FEB 2026Free Online Utility Tools