IPv4 subnet calculator

Enter an IPv4 address and CIDR prefix length to get the network range, mask, broadcast, and host counts.

Results

CIDR
Subnet mask
Network
Broadcast
First usable
Last usable
Total IPs
Usable hosts
IP range

IPv6 subnet calculator

Enter an IPv6 address and prefix length to get the network prefix, first/last address in the subnet, and size. (IPv6 has no broadcast address.)

Results

Prefix
Network prefix
First address
Last address
Subnet size
Compressed
Expanded

How subnetting works (in plain English)

A subnet is just a way to group IP addresses. The CIDR prefix tells you how large that group is. For IPv4, /24 means “the first 24 bits define the network,” leaving 8 bits for hosts (256 addresses). For IPv6, prefixes work the same way — the numbers are bigger and subnets are usually much larger (often /64).

Common IPv4 subnet sizes

These are the CIDR sizes you’ll see most often in real networks. You can also download the table as a CSV.

Download common subnet sizes (CSV)
CIDRTotal IPsUsable hostsTypical use
/3042Point-to-point links
/2986Small network segment
/281614Small office / VLAN
/273230Small office / VLAN
/266462Office / lab
/25128126Office / campus
/24256254Typical LAN
/23512510Larger LAN
/221,0241,022Large office / VLAN
/212,0482,046Campus / enterprise
/204,0964,094Enterprise segment
/198,1928,190Large enterprise
/1665,53665,534Very large network (legacy)

FAQ

How many IPs are in a /24?

A /24 contains 256 total IPv4 addresses. Typically 254 are usable hosts (network + broadcast are reserved).

What’s the difference between CIDR and subnet mask?

They represent the same thing: how many bits belong to the network. CIDR uses a prefix length (like /24). A subnet mask uses dotted decimal (like 255.255.255.0).

Why does IPv6 have no broadcast address?

IPv6 was designed without broadcast. It uses multicast instead, and many operations that used broadcast in IPv4 work differently in IPv6.

Why do /31 and /32 look weird?

/32 is a single IPv4 address. /31 has two addresses and is commonly used for point-to-point links (both addresses can be used under modern standards).

Related tools