Back to tools

CIDR Calculator

Calculate the Network, Broadcast, and Usable Hosts for Any CIDR Block

CIDR notation like 192.168.1.0/24 is how modern networks describe an address block, but reading it by hand takes practice. The prefix length after the slash determines the subnet mask, the number of addresses, and — once you subtract the network and broadcast addresses — how many hosts you can actually assign. Getting this wrong leads to firewalls that block the wrong ranges, VPCs that run out of IPs, and subnet plans that do not fit. This CIDR calculator removes the arithmetic: enter a block and it returns the network address, broadcast address, subnet mask, wildcard mask, first and last usable hosts, and total capacity. Everything is computed instantly in your browser.

How to Use the CIDR Calculator

  1. Type your block in CIDR notation, for example 10.0.0.0/24, into the input field.
  2. Confirm the prefix length — the number after the slash — matches your intent.
  3. Read the network address, which is the first address of the block and identifies the subnet itself.
  4. Check the broadcast address, the last address, which is never assigned to a host.
  5. Review the usable host range between them and the total host count.
  6. Use the values to write firewall rules, configure DHCP scopes, or size a cloud VPC.

Real Example: Input and Output

Sizing a small office network is a common task. A /24 block fits most offices, while a /30 is exactly enough for a point-to-point link between two routers.

InputNetworkBroadcastUsable Hosts
192.168.1.0/24192.168.1.0192.168.1.255254
10.0.0.0/3010.0.0.010.0.0.32
172.16.0.0/16172.16.0.0172.16.255.25565,534

Tips for Subnet Planning

When to Use This Tool

Frequently Asked Questions

Why are two addresses subtracted from the total?

The first address of a block is the network address, which identifies the subnet, and the last is the broadcast address, which reaches every host on it. Neither can be assigned to a device, so usable hosts equal the total minus two.

What is the subnet mask for a /24?

A /24 corresponds to the mask 255.255.255.0. Every prefix length maps to one mask; the calculator shows both forms so you can use whichever your equipment expects.

How many usable hosts are in a /24?

Exactly 254. The block contains 256 addresses, minus one network address and one broadcast address.

Is a /31 subnet usable?

Yes, for point-to-point links. RFC 3021 allows a /31 with two usable addresses and no broadcast, which is common on router-to-router links where every address counts.

What does the prefix length actually mean?

It is the number of leading 1 bits in the subnet mask. A /24 means the first 24 bits identify the network and the remaining 8 bits identify hosts within it.

What is the broadcast address used for?

Packets sent to the broadcast address reach every host on the subnet. It is used by protocols such as ARP and DHCP for discovery, and it is never assigned to a single device.

How do I choose a CIDR block for a new VPC?

Pick a private range that does not overlap your other networks, such as 10.0.0.0/16, then split it into subnets sized for each tier with headroom for growth.

Does CIDR apply to IPv6?

Yes. IPv6 uses the same notation, for example 2001:db8::/64, but the host math differs because IPv6 has no broadcast address and the usable count is effectively the full block.