Free Network Tool

IP Block Size Calculator

Calculate the block size (total IP addresses) for any CIDR prefix, or find the smallest CIDR prefix that fits your required number of hosts. Supports CIDR input (/24), block size input (256), and host count input (200 hosts needed). Includes AWS reserved IP guidance.

CIDR or host count input AWS sizing guide Runs locally Always free
Network tool
Enable JavaScript to run lookups and interactive features on this page.

Hero, guides, and sidebar links below work without JavaScript. The interactive checker needs JavaScript enabled in your browser.

IP Block Sizes — Complete CIDR Reference

An IP block is a contiguous range of IP addresses defined by a CIDR prefix. The block size is always a power of 2: a /24 block has 2⁸ = 256 addresses, a /25 has 128, a /23 has 512. Understanding the relationship between CIDR prefix lengths and block sizes is fundamental to subnet planning, IP allocation, and firewall rule writing.

IP block sizes — CIDR prefixes and their corresponding address counts

Every CIDR prefix maps to a power-of-2 block size — halving the block size with each increment in prefix length

CIDR Block Size Reference Table

CIDRBlock SizeUsable HostsSubnet MaskUse Case
/816,777,21616,777,214255.0.0.0Class A private block (10.0.0.0/8), large ISP allocation
/1665,53665,534255.255.0.0AWS VPC, large enterprise, Class B private
/204,0964,094255.255.240.0Medium enterprise site, cloud region subnet
/221,0241,022255.255.252.0Large office/campus VLAN
/23512510255.255.254.0Two merged /24s, medium site
/24256254255.255.255.0Standard office subnet, AWS /24 gives 251 usable (5 reserved)
/25128126255.255.255.128Half a /24, 100-host department
/266462255.255.255.192Small department, 50-host team
/273230255.255.255.224Small segment, server group
/281614255.255.255.240Very small segment, AWS minimum recommended
/2986255.255.255.248Tiny segment, 6-host max
/3042255.255.255.252Point-to-point WAN link (2 routers)
/3122*255.255.255.254P2P link RFC 3021, no network/broadcast reserved
/3211255.255.255.255Single host route, loopback, firewall specific-host rules

* /31 per RFC 3021 — both addresses usable for point-to-point. Formula: Block size = 2^(32−prefix), Usable = Block size − 2 (except /31 and /32).

How to Choose the Right Block Size

Select the smallest CIDR block that accommodates your required number of hosts: find the smallest power of 2 that is ≥ hosts + 2 (for network and broadcast). For 200 hosts: 200 + 2 = 202, next power of 2 = 256 = /24. For 50 hosts: 52 → next power of 2 = 64 = /26 (62 usable). For AWS, add 5 (not 2) for reserved IPs. Use the calculator above — enter your host count and it selects the optimal CIDR prefix automatically.

Frequently Asked Questions

How many IPs are in a /24 block?

A /24 block contains 256 total IP addresses (2^8 = 256). Of these, 254 are usable for hosts (the network address and broadcast address are reserved). In AWS, a /24 provides only 251 usable IPs because AWS additionally reserves the router address (.1), DNS address (.2), and future-use address (.3) in every subnet.

What is the formula for IP block size?

Block size = 2^(32 − prefix_length). For /24: 2^(32−24) = 2^8 = 256. For /26: 2^(32−26) = 2^6 = 64. For /16: 2^(32−16) = 2^16 = 65,536. Usable hosts = block_size − 2 (subtracting network address and broadcast address). Exception: /31 has 2 usable hosts (no reserved addresses), /32 has 1 address total.

What block size do I need for 100 hosts?

For 100 hosts, you need 100 + 2 = 102 total addresses (network and broadcast reserved). The next power of 2 ≥ 102 is 128 = /25 (126 usable hosts). In AWS with 5 reserved IPs, you need 100 + 5 = 105, so /25 (128 − 5 = 123 usable) still works. If you need room to grow beyond 126, use /24 (254 usable).

What is the smallest AWS subnet I can use?

AWS supports subnet sizes from /16 to /28. The smallest is /28 (16 addresses). After AWS reserves 5 IPs, a /28 provides 11 usable IPs. AWS recommends /24 (251 usable) as the minimum for most workloads to allow for growth and service IP requirements (load balancers, NAT gateways, and endpoints also consume IPs from the subnet).

Is this IP block size calculator free?

Yes — completely free, no signup required. Accepts CIDR prefixes (/24), block sizes (256), or host counts (200) and automatically determines the correct CIDR prefix. All calculations run in your browser.

Related Calculators & Tools

Advertisement