We Value Your Privacy

We use cookies to enhance your browsing experience and analyze site traffic. All calculations happen locally in your browser - we never see or store your data. Learn more in our Privacy Policy

/
/
CalculateYogi
  1. Home
  2. Technology
  3. CIDR Calculator
Technology

CIDR Calculator

Convert an IPv4 CIDR block to its address range, decompose a range into aligned blocks, split a network into subnets, and aggregate blocks into a supernet.

Common scenarios
What do you want to do?

Subnet cheat sheet — every prefix from /0 to /32

Usable hosts exclude the network and broadcast addresses. A /31 carries two usable addresses on a point-to-point link (RFC 3021) and a /32 is a single host.

PrefixSubnet maskWildcardAddressesUsable hosts
/32255.255.255.2550.0.0.011
/31255.255.255.2540.0.0.122
/30255.255.255.2520.0.0.342
/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
/23255.255.254.00.0.1.255512510
/22255.255.252.00.0.3.2551,0241,022
/21255.255.248.00.0.7.2552,0482,046
/20255.255.240.00.0.15.2554,0964,094
/19255.255.224.00.0.31.2558,1928,190
/18255.255.192.00.0.63.25516,38416,382
/17255.255.128.00.0.127.25532,76832,766
/16255.255.0.00.0.255.25565,53665,534
/15255.254.0.00.1.255.255131,072131,070
/14255.252.0.00.3.255.255262,144262,142
/13255.248.0.00.7.255.255524,288524,286
/12255.240.0.00.15.255.2551,048,5761,048,574
/11255.224.0.00.31.255.2552,097,1522,097,150
/10255.192.0.00.63.255.2554,194,3044,194,302
/9255.128.0.00.127.255.2558,388,6088,388,606
/8255.0.0.00.255.255.25516,777,21616,777,214
/7254.0.0.01.255.255.25533,554,43233,554,430
/6252.0.0.03.255.255.25567,108,86467,108,862
/5248.0.0.07.255.255.255134,217,728134,217,726
/4240.0.0.015.255.255.255268,435,456268,435,454
/3224.0.0.031.255.255.255536,870,912536,870,910
/2192.0.0.063.255.255.2551,073,741,8241,073,741,822
/1128.0.0.0127.255.255.2552,147,483,6482,147,483,646
/00.0.0.0255.255.255.2554,294,967,2964,294,967,294
Did this calculator solve your problem today?

Contributor

Reviewed by

Last updated: September 13, 2026
SupportI build these free tools with love, late nights, and way too much coffee. If this calculator helped you, a small donation would mean the world to me and help keep this site running. Thank you for your kindness!

Related Calculators

You might also find these calculators useful

IPv6 Subnet Calculator

Prefix, address range, /64 count and IANA address type

Subnet Calculator

Network, broadcast, mask and usable hosts for any IPv4 subnet

MTU Calculator

Effective MTU and TCP MSS from real protocol overhead

Bandwidth Calculator

How much internet speed you need, and how long a transfer takes

CIDR Calculator

Give this calculator a CIDR block and it returns the subnet mask, the network and broadcast addresses, the usable host range and the host count. Give it a pair of addresses and it returns the smallest set of CIDR blocks that covers them exactly. It also splits a block into equal subnets and aggregates several blocks into the smallest one that contains them. Every prefix from /0 to /32 is on the page as a cheat sheet, whether or not you calculate anything.

What CIDR notation means

CIDR writes an address together with its routing prefix — 192.168.1.0/24. The number after the slash is how many leading bits identify the network; the remaining bits identify hosts inside it. A /24 leaves 8 host bits, so 2^8 = 256 addresses, of which 254 are usable once the network and broadcast addresses are set aside. CIDR replaced the fixed class boundaries of the original IPv4 design, which is why a modern subnet has a prefix length rather than a class.

Addresses in a block

How to use it

1

2

3

4

5

When you need a subnet calculator

Sizing a VLAN or VPC

Pick the prefix that fits the host count you need without stranding thousands of addresses. A /24 holds 254 hosts; a /22 holds 1,022.

Writing a firewall rule

Convert an address range your security team gave you into the CIDR blocks the rule syntax accepts, with no gaps and no overlap.

Splitting a block between sites

Divide one allocation into equal subnets and read each one's network, broadcast and host range.

Summarising routes

Aggregate several blocks into the smallest one that covers them, and see exactly how many extra addresses that advertises.

What this calculator gives you

The full block, not just the mask

Network address, broadcast address, first and last usable host, wildcard mask and the binary mask, from one CIDR block.

Ranges in both directions

Turn a start and end address into the minimal set of aligned CIDR blocks — the shape a firewall or route table actually wants.

Honest address classification

Private, loopback, link-local, carrier-grade NAT, documentation and reserved ranges are identified from IANA's IPv4 Special-Purpose Address Registry, not from a guess about the first octet.

A cheat sheet that stays on screen

All 33 prefixes with mask, wildcard, address count and usable hosts — visible before and after you calculate, with your prefix highlighted.

Frequently asked questions

The first 24 bits are the network prefix, leaving 8 bits for hosts. That is a 255.255.255.0 mask, 256 addresses and 254 usable hosts — the network address and the broadcast address are not assignable to a host.

2^(32 − prefix) − 2 for any prefix up to /30. The two exceptions are at the bottom: a /31 carries two usable addresses on a point-to-point link under RFC 3021, and a /32 is a single host.

No. Private address space is exactly three blocks — 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, defined in RFC 1918. 127.0.0.0/8 is loopback, a separate reservation under RFC 1122. Both are unreachable from the internet, but they are not the same thing, and 100.64.0.0/10 is a third category again: shared address space for carrier-grade NAT.

CIDR is the notation and the routing model; VLSM is the practice of using different prefix lengths inside one network, which CIDR is what makes possible. Splitting a /16 into a /24 for one site and a /28 for a point-to-point link is VLSM, written in CIDR.

Subnetting borrows whole bits, and each bit doubles the count. Three borrowed bits give 8 subnets; two give 4. Asking for 5 rounds up to 8, and the extra three stay unallocated rather than being distributed.

Not for addressing. CIDR replaced class A, B and C boundaries in 1993, and no current routing protocol infers a prefix length from the first octet. The terms survive in exam syllabuses and in conversation, which is why this calculator reports the prefix and the IANA special-purpose status instead of a class.

CalculateYogi

The most comprehensive calculator web app. Free, fast, and accurate calculators for everyone.

Calculator Categories

  • Math
  • Finance
  • Health
  • Conversion
  • Date & Time
  • Statistics
  • Science
  • Engineering
  • Business
  • Everyday
  • Construction
  • Education
  • Technology
  • Food & Cooking
  • Sports
  • Climate & Environment
  • Agriculture & Ecology
  • Social Media
  • Other

Company

  • About
  • Contact
  • Contributors

Legal

  • Privacy Policy
  • Terms of Service
  • Editorial Policy

© 2026 CalculateYogi. All rights reserved.

Sitemap

Made with by the AppsYogi team