DevTools Hub

Search tools

Search for a developer tool

Network Security

CIDR Calculator

Calculate network address, broadcast address, host range, and subnet mask from IPv4 CIDR notation.

Part of the Network Security Toolkit
Network address

192.168.1.0

Broadcast address

192.168.1.255

Subnet mask

255.255.255.0

First host

192.168.1.1

Last host

192.168.1.254

Usable hosts

254 of 256 total

Subnet visualization
Network
192.168.1.0
Usable host range (254)
192.168.1.1192.168.1.254
Broadcast
192.168.1.255
Address (binary)
11000000101010000000000100001010

Network bits Host bits

Subnet mask (binary)
11111111111111111111111100000000

Network bits Host bits

What this does

Takes an IPv4 address in CIDR notation — 192.168.1.0/24 — and computes everything a router or a network engineer derives from it: the subnet mask, network address, broadcast address, the usable host range, and how many hosts actually fit. Entering any address inside the subnet works the same as entering the network address itself — 192.168.1.200/24 resolves to the same 192.168.1.0 network, exactly like a router masking off the host bits would.

What the visualization shows

The binary breakdown highlights exactly which of the 32 bits are the fixed network portion and which are free to vary across hosts — the direct visual answer to what a prefix length like /24 actually means. The range bar underneath shows the subnet spatially: the network and broadcast addresses at each end (reserved, not assignable to a host) and the usable range in between. For /31 and /32, the layout changes to reflect their special cases — see the FAQ below.

Edge cases worth knowing

FAQ

What does the number after the slash actually mean?

It's the prefix length — how many of the address's 32 bits, counting from the left, are fixed as the network portion. /24 means the first 24 bits identify the network and the remaining 8 bits identify hosts within it, which is exactly why a /24 has 256 total addresses (2 to the power of 8).

Why are the network and broadcast addresses not usable as host addresses?

The network address (all host bits set to 0) identifies the subnet itself, and the broadcast address (all host bits set to 1) is reserved for sending a packet to every host on the subnet at once — neither can also serve as one specific host's address without ambiguity. This is why usable hosts is total addresses minus 2, for any prefix of /30 or shorter.

Why don't /31 and /32 follow the minus-2 rule?

RFC 3021 specifically carves out /31 for point-to-point links, where wasting 2 of only 4 possible role-appropriate addresses (network and broadcast) is impractical — both addresses are treated as directly usable host addresses instead. /32 identifies a single specific address with no room for a separate network or broadcast address at all, so it's just that one address, usable as a host route.

Does entering a non-network-aligned IP address change the result?

No — enter any address within the subnet (192.168.1.10/24 or 192.168.1.200/24) and the calculator resolves the same network address by masking off the host bits, exactly like a router would. Only the prefix length changes which bits get masked.

Is this the same as a subnet calculator?

Yes — CIDR notation and subnet masks describe the same thing two different ways, and a CIDR calculator and a subnet calculator answer the same question. See the network address, broadcast address, host range, and mask for a given prefix here.

Try it yourself

For the full picture of how CIDR notation and subnet masks actually work — not just the arithmetic — see CIDR Explained.

Related tools