# CIDR Calculator

Calculate IP address ranges, subnet masks, and usable host counts from CIDR notation. Enter an IP and prefix length to see network details instantly.

## What this calculates

Enter an IP address and CIDR prefix length to see the full network breakdown: network and broadcast addresses, usable host range, subnet mask, wildcard mask, and IP class. Perfect for network engineers, sysadmins, and anyone configuring firewalls or VPCs.

## Inputs

- **IP Octet 1** — min 0, max 255
- **IP Octet 2** — min 0, max 255
- **IP Octet 3** — min 0, max 255
- **IP Octet 4** — min 0, max 255
- **CIDR Prefix** (/) — min 0, max 32 — Prefix length from /0 to /32

## Outputs

- **CIDR Notation** — formatted as text
- **Network Address** — formatted as text
- **Broadcast Address** — formatted as text
- **Subnet Mask** — formatted as text
- **First Usable Host** — formatted as text
- **Last Usable Host** — formatted as text
- **Total Addresses** — formatted as text
- **Usable Host Count** — formatted as text
- **Wildcard Mask** — formatted as text
- **IP Class** — formatted as text

## Details

CIDR (Classless Inter-Domain Routing) replaced the old class-based addressing system in 1993. Instead of fixed Class A/B/C boundaries, CIDR lets you define any prefix length from /0 to /32.

Quick reference for common prefix lengths:

  - /8 -- 16,777,216 addresses (old Class A)

  - /16 -- 65,536 addresses (old Class B)

  - /24 -- 256 addresses (old Class C, most common LAN)

  - /28 -- 16 addresses (small subnet, 14 usable hosts)

  - /30 -- 4 addresses (point-to-point link, 2 usable)

  - /31 -- 2 addresses (RFC 3021 point-to-point)

  - /32 -- 1 address (single host route)

Private address ranges (RFC 1918):

  - 10.0.0.0/8 -- 10.0.0.0 to 10.255.255.255

  - 172.16.0.0/12 -- 172.16.0.0 to 172.31.255.255

  - 192.168.0.0/16 -- 192.168.0.0 to 192.168.255.255

## Frequently Asked Questions

**Q: What is the difference between CIDR and subnet mask notation?**

A: They express the same thing in different formats. /24 and 255.255.255.0 are identical -- both mean the first 24 bits identify the network. CIDR notation is shorter and more common in modern configurations, while subnet mask notation is still used in older router interfaces and Windows network settings.

**Q: How do I figure out which CIDR prefix I need?**

A: Count how many hosts you need, then find the smallest prefix that fits. For 50 hosts, you need at least 52 addresses (50 hosts + network + broadcast), so a /26 (64 addresses, 62 usable) works. For 200 hosts, you need a /24 (256 addresses, 254 usable).

**Q: What is a wildcard mask and when do I use it?**

A: A wildcard mask is the inverse of the subnet mask. Where the subnet mask has 1s, the wildcard has 0s and vice versa. Cisco routers use wildcard masks in access control lists (ACLs) and OSPF area definitions. For a /24, the wildcard mask is 0.0.0.255.

**Q: Can I use this for IPv6?**

A: This calculator handles IPv4 addresses only. IPv6 uses a 128-bit address space with a different notation system. The CIDR concept still applies to IPv6, but the prefix lengths range from /0 to /128 instead of /0 to /32.

---

Source: https://vastcalc.com/calculators/everyday/cidr
Category: Everyday Life
Last updated: 2026-04-08
