Skip to content
Calcrivo

CIDR Calculator

Enter an IP address and CIDR prefix to get the network range, subnet mask, and usable host count.

Inputs

Any address in the block, e.g. 192.168.1.0

/

0–32

CIDR Block

192.168.1.0/24

Network Address

192.168.1.0

Broadcast Address

192.168.1.255

Usable Host Range

192.168.1.1 – 192.168.1.254

Subnet Mask

255.255.255.0

Total Addresses

256

Usable Hosts

254

Step by step

  1. Values used

    IPv4 Address = 192.168.1.0; CIDR Prefix = 24 /

  2. Usable hosts from prefix

    hosts = 2^(32 − prefix) − 2

  3. CIDR Block

    = 192.168.1.0/24

  4. Network Address

    = 192.168.1.0

  5. Broadcast Address

    = 192.168.1.255

  6. Usable Host Range

    = 192.168.1.1 – 192.168.1.254

  7. Subnet Mask

    = 255.255.255.0

  8. Total Addresses

    = 256

How it works

CIDR (Classless Inter-Domain Routing) notation combines an IP address with a prefix length that states how many leading bits form the network portion. The remaining bits identify hosts within that network. The network address is found by ANDing the IP with the mask derived from the prefix, and the broadcast address is the network ORed with the inverse mask. Usable hosts are the total addresses in the block minus the network and broadcast addresses (2^(32−prefix) − 2), except for the /31 point-to-point (RFC 3021) and /32 host-route special cases.

Formula

Usable hosts from prefix

hosts = 2^(32 − prefix) − 2

p
CIDR prefix length (0–32)

Guides that use this calculator

Frequently Asked Questions

What is CIDR notation?

CIDR notation writes an IP address followed by a slash and a number (e.g. 192.168.1.0/24), where the number is the count of leading bits that make up the network portion of the address.

How is the number of usable hosts calculated?

Usable hosts = 2^(32 − prefix) − 2. The subtraction removes the network address and the broadcast address, which cannot be assigned to hosts. /31 subnets (point-to-point links) and /32 (single host) are exceptions per RFC 3021.

Why does a smaller prefix mean a bigger network?

The prefix counts network bits; fewer network bits leaves more host bits, which doubles the address space for every bit removed. A /23 has twice the addresses of a /24.

Does the entered IP need to be the network address?

No — any address inside the block works. The calculator ANDs your address with the derived mask to find the actual network address for you.

You might also need