CIDR Calculator

Enter a CIDR block (e.g. 10.0.0.0/8) to instantly see network address, broadcast, subnet mask, usable host range, and total hosts.

A /n prefix fixes the first n of the 32 address bits.

Use the CIDR Calculator

CIDR Block

Quick examples

Prefix / Host split

24 bits
8 bits
Network Host

Subnet Details

IP Address —
Network Address —
Broadcast —
Subnet Mask —
Wildcard Mask —
First Host —
Last Host —
Total Addresses —
Usable Hosts —

Binary Representation

IP Address —
Subnet Mask —
Network —
Copied!

Quick answer

A /n prefix fixes the first n of the 32 address bits. The block holds 2^(32 − n) addresses; subtract 2 for the network and broadcast addresses to get usable hosts (/31 and /32 are the exceptions).

Examples

CIDRSubnet maskUsable hosts
/8255.0.0.016,777,214
/16255.255.0.065,534
/22255.255.252.01,022
/24255.255.255.0254
/27255.255.255.22430
/28255.255.255.24014
/30255.255.255.2522

Enter a CIDR block.

Summary

This CIDR calculator takes any IPv4 address in CIDR notation (e.g. 192.168.1.0/24) and breaks it down into all key subnet details: network address, broadcast address, subnet mask, wildcard mask, first and last usable host, total hosts, and usable hosts. Results update instantly in the browser without any server requests.

How it works

  1. Enter an IPv4 address with a prefix length such as 192.168.1.0/24 in the input field.
  2. The tool splits the notation into the host IP and prefix length (0–32).
  3. It computes the subnet mask by setting the top N bits of a 32-bit integer.
  4. Network address = IP AND mask; Broadcast = IP OR (NOT mask).
  5. First usable host = Network + 1; Last usable host = Broadcast - 1.
  6. Usable host count = 2^(32 - prefix) - 2 (or 2 for /31, 1 for /32).

Use cases

  • Plan IP address allocation for VPCs, data centers, or home networks.
  • Verify subnet boundaries before configuring routers or firewalls.
  • Calculate the broadcast address needed for ACL or routing rules.
  • Determine the number of usable hosts in a proposed subnet.
  • Understand supernetting by testing large prefix lengths like /8 or /16.
  • Cross-check network documentation and IP scheme designs.
  • Teach or learn subnetting concepts interactively.
  • Validate CIDR blocks in Terraform, Ansible, or cloud configs.

Frequently Asked Questions

Last updated: 2026-05-23 · Reviewed by Nham Vu