CIDR Calculator

Calculate network range, netmask, and usable hosts from CIDR notation.

Calculator by SuperCalX: formulas, worked examples and 250+ free calculators.

Your values

Result

Enter your values and the result appears here.

Analysis

Interpretation of the current calculator output

Enter values to see detailed analysis and insights.

How to Use

Step-by-step instructions
  1. 1Enter the IP address.
  2. 2Enter the CIDR suffix (e.g., 24 for /24).
  3. 3The calculator will display the netmask and host count.

Subnet Calculation

Calculates the number of available IP addresses in a subnet based on the prefix length (CIDR).
Hosts = 2^(32 - CIDR) - 2

Variables:

CIDRNetwork prefix length (0-32)

Example

/24 Network

Inputs:

IP:192.168.1.0
CIDR:24

Steps:

  1. 1.Host Bits = 32 - 24 = 8
  2. 2.Total Hosts = 2^8 = 256
  3. 3.Usable = 256 - 2 = 254
Result:
254 Hosts

CIDR Calculator: the short answer

CIDR notation like 192.168.1.0/24 shows how many leading bits are the network part. Usable hosts = 2^(32 − prefix) − 2. A /24 has 256 addresses and 254 usable hosts with mask 255.255.255.0; a /26 has 64 addresses, 62 usable hosts and mask 255.255.255.192.

  • The first address is the network ID and the last is the broadcast address.
  • /31 links (RFC 3021) and /32 single hosts are special cases.
  • Private ranges: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.

By the SuperCalX team · Reviewed by Dr. Ahmed Mortuza Saleque, founder and editor · Last reviewed · How we check our calculators

Common subnet sizes

PrefixSubnet maskAddressesUsable hosts
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/24255.255.255.0256254
/26255.255.255.1926462
/28255.255.255.2401614
/30255.255.255.25242

Finding the network range

The binary maths is the same AND operation covered by the logic gate calculator.

  • Convert the IP and mask to binary.
  • AND them together for the network address.
  • Set all host bits to 1 for the broadcast address.
  • Usable hosts lie between those two.

Worked examples

192.168.10.77/26

  1. Block size = 2^(32 − 26) = 64.
  2. 77 falls in the block 64–127.

Network 192.168.10.64, broadcast .127, hosts .65 – .126.

Common mistakes

  • Forgetting to subtract the network and broadcast addresses from the host count.

CIDR Calculator FAQ

How many hosts in a /24?

254 usable addresses.

What is a /32?

A single IP address, often used in firewall rules and routes.

Why -2 hosts?

The first address is the Network Address and the last is the Broadcast Address. Neither can be assigned to a specific host.

CIDR Calculator For IP Subnetting

Calculate CIDR ranges and subnetting details faster when planning networks, validating masks, or checking address allocation.
  • Useful for network planning and subnet validation
  • Helps translate CIDR notation into usable ranges
  • Supports troubleshooting and documentation work

How To Use The Result

Use the output to confirm the network address, broadcast address, prefix length, and usable host range before applying the subnet to routers, firewalls, or documentation.

Why does CIDR matter more than dotted masks in many workflows?

Because CIDR prefix notation is compact, widely used in modern documentation, and directly communicates the network boundary size.

What mistake happens most often with subnetting?

Users often misread how many addresses are reserved versus usable, especially on smaller subnets.

Add this calculator to your website

Teachers, bloggers and businesses can show the CIDR Calculator on their own pages for free. Copy this code and paste it into your page's HTML:

Please keep the credit link so readers can find the formula, worked examples and guide.