Back to Blog
Technical

IPv4 Subnet Calculator: Understanding CIDR Notation and Subnet Sizes

January 24, 2026
Mustafa Enes Akdeniz
IPv4 Subnet Calculator: Understanding CIDR Notation and Subnet Sizes

What Is CIDR Notation?

CIDR (Classless Inter-Domain Routing) notation is the standard way to express IP address ranges. It uses a slash followed by a number (e.g., /24) to indicate how many bits are used for the network portion, which determines the size of the address block.

Complete CIDR Reference Table

CIDRSubnet MaskTotal IPsUsable IPsCommon Use Case
/32255.255.255.25511Single host
/31255.255.255.25422Point-to-point link
/30255.255.255.25242Small WAN link
/29255.255.255.24886Small office
/28255.255.255.2401614Small network segment
/27255.255.255.2243230Department network
/26255.255.255.1926462Small datacenter
/25255.255.255.128128126Medium network
/24255.255.255.0256254Standard network, minimum routable
/23255.255.254.0512510Small-medium ISP
/22255.255.252.01,0241,022Medium infrastructure
/21255.255.248.02,0482,046Datacenter, hosting
/20255.255.240.04,0964,094Large hosting, ISP
/19255.255.224.08,1928,190Regional ISP
/18255.255.192.016,38416,382Large ISP
/17255.255.128.032,76832,766Major provider
/16255.255.0.065,53665,534Enterprise, large ISP

Key Concepts

Network and Broadcast Addresses

In most subnets (/30 and larger), two addresses are reserved: the first address is the network address, and the last is the broadcast address. This is why a /24 has 256 total IPs but only 254 usable.

The /24 Minimum

A /24 (256 IPs) is generally the smallest block that can be independently routed on the public internet. Most ISPs will not accept BGP announcements for prefixes smaller than /24. This makes /24 the de facto minimum purchase size for IPv4 blocks.

Quick Calculation Formula

To calculate the number of IPs: 2^(32 - CIDR) = Total IPs

  • /24 = 2^(32-24) = 2^8 = 256 IPs
  • /22 = 2^(32-22) = 2^10 = 1,024 IPs
  • /20 = 2^(32-20) = 2^12 = 4,096 IPs
  • /16 = 2^(32-16) = 2^16 = 65,536 IPs

Choosing the Right Subnet Size

Consider these factors:

  • Current needs + 20% buffer: Plan for some growth
  • Budget: Larger blocks cost more total but less per IP
  • Routability: /24 is the minimum for public routing
  • Aggregation: Buying contiguous blocks allows aggregation for cleaner routing

Browse our marketplace to find blocks in the size you need, or start your purchase today.

subnet calculatorCIDRsubnet masknetworkingguide
Available in other languages:
Türkçe