Free CIDR & Subnet Calculator

CIDR & Subnet Calculator

Calculate subnet details, usable hosts, and split CIDRs instantly. Supports both IPv4 and IPv6. No sign-up required, runs entirely in your browser.

Total Hosts
Usable Hosts
Network Class

Subnet Details

Binary Representation

Visual Subnet Splitter

Split a CIDR block into 2, 4, or 8 equal subnets. Works for IPv4 and IPv6.

AWS VPC Subnet Planner

Optimal subnet splits for public, private, and database tiers across Availability Zones.

Common Examples

Click any example to load it into the calculator above.

Usable Hosts

What is CIDR Notation?

CIDR (Classless Inter-Domain Routing) notation represents an IP address and its network prefix length in the format IP/prefix, for example 192.168.1.0/24. The prefix number indicates how many bits are used for the network portion, with the remaining bits available for host addresses.

How to Calculate Subnet Size from CIDR

The number of total addresses in a subnet equals 2 raised to the power of the host bits (32 minus the prefix for IPv4). For example, a /24 subnet has 2^8 = 256 total addresses and 254 usable hosts after subtracting the network and broadcast addresses.

CIDR Prefix Total Addresses Usable Hosts
/8 16,777,216 16,777,214
/12 1,048,576 1,048,574
/16 65,536 65,534
/20 4,096 4,094
/24 256 254
/28 16 14
/30 4 2
/32 1 0

RFC 1918 Private IP Address Ranges

RFC 1918 defines three private IP address ranges that are not routable on the public internet. These ranges are used for internal networks, cloud VPCs, and home networks.

Range Subnet Mask Total Hosts
10.0.0.0/8 255.0.0.0 16,777,214
172.16.0.0/12 255.240.0.0 1,048,574
192.168.0.0/16 255.255.0.0 65,534

Click any range to load it into the calculator above.

AWS VPC Subnetting Guide

AWS reserves 5 IP addresses in every subnet: the network address, VPC router address, DNS server address, future use address, and broadcast address. A /24 subnet in AWS has 251 usable hosts instead of the standard 254.

VPC Size Recommended Subnet Layout
/16 VPC 4x /18 subnets (16,382 hosts each)
/16 VPC 8x /19 subnets (8,190 hosts each)
/20 VPC 4x /22 subnets (1,022 hosts each)
/24 VPC 4x /26 subnets (59 hosts each)

What is VLSM (Variable Length Subnet Masking)?

VLSM allows network engineers to divide an IP address space into subnets of different sizes based on actual host requirements. This eliminates IP address waste compared to using a single fixed subnet size for all network segments.

Frequently Asked Questions