kernelry

CIDR Calculator

Type an IP block, drag the prefix slider, and inspect network boundaries in real time. Every calculation runs locally in your browser - nothing you enter is sent anywhere.

Address / prefix

Type across the boxes, or use ↑ and ↓ to step a number. Pasting a whole block like 10.0.0.0/8 into any box fills them all.

Prefix length/16
/0/8/16/24/32
Jump to

10.42.0.0/16

Private (RFC 1918)

Routable inside your own network only. Never seen on the public internet.

Network

The block itself. Not assignable to a host.

Broadcast

Reaches every host on the segment.

First host

Usually the gateway, by convention rather than by rule.

Last host

The top of the assignable range.

Netmask

What an interface config wants when it will not take a prefix.

Wildcard

The inverse. What ACLs on Cisco gear and some firewalls expect.

Total addresses

2^16, everything the prefix covers.

Usable hosts

Total minus the network and broadcast addresses.

Where the mask falls on 10.42.0.0

▮ network bits (16)▮ host bits (16)

The address as typed, in binary. Click any bit to flip it: the host bits are the ones the prefix leaves free, and flipping a network bit moves you to a different block entirely.

10

42

0

0

Move around

The blocks next to this one, the block that contains it, and the two it splits into.

Neighbours

previous
next

Up and down

contained by
first half
second half

Is an address inside this block?

Type an address.

IPv4 CIDR & Subnet Mask Reference Cheat Sheet

Classless Inter-Domain Routing (CIDR) replaces legacy IP address classes (Class A, B, C) by allocating variable-length subnet prefixes. The slash notation indicates how many leading bits are dedicated to the network identifier.

PrefixSubnet MaskWildcard MaskTotal IPsUsable Hosts
/32255.255.255.2550.0.0.011 (Single Host)
/30255.255.255.2520.0.0.342 (Point-to-Point)
/29255.255.255.2480.0.0.786
/28255.255.255.2400.0.0.151614
/27255.255.255.2240.0.0.313230
/26255.255.255.1920.0.0.636462
/25255.255.255.1280.0.0.127128126
/24255.255.255.00.0.0.255256254 (Standard Subnet)
/23255.255.254.00.0.1.255512510
/22255.255.252.00.0.3.2551,0241,022
/20255.255.240.00.0.15.2554,0964,094
/16255.255.0.00.0.255.25565,53665,534 (VPC Standard)

Usable Hosts Formula

In standard IPv4 subnets, the number of usable host addresses is calculated as:
2^(32 - prefix) - 2
The two reserved addresses represent the Network Address (first IP) and Broadcast Address (last IP).

Cloud Subnet Reservations (AWS)

In an AWS VPC subnet, Amazon reserves 5 IP addresses per subnet: the network address, VPC router (.1), DNS resolver (.2), future use (.3), and broadcast. Always account for this when sizing Kubernetes Pod subnets.