CIDR Calculator
Calculate network, broadcast, mask, wildcard, host range and host counts for a CIDR block.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
192.168.1.10/24 → network 192.168.1.0/24.
How it works
- Parsed the dotted-quad address and the prefix length.
- Applied the /24 netmask (255.255.255.0) to derive the network address.
- Inverted the netmask to get the wildcard mask and OR-ed it with the network to get the broadcast address.
- Counted usable hosts for the prefix (RFC 3021 for /31 and /32).
network = address AND mask; broadcast = network OR (NOT mask)- Host bits that were set in the input are reported and the network address is normalised.
- /31 follows RFC 3021 (two usable addresses) and /32 has one usable address.
Methodology
- Parse the address and prefix with a strict dotted-quad grammar (leading-zero octets are rejected).
- Derive the netmask from the prefix as a 32-bit unsigned integer (no signed shift overflow).
- Compute network = address AND mask and broadcast = network OR wildcard.
- Apply RFC 3021 semantics for /31 and /32 and count the remaining usable addresses.
Usage
- Enter a CIDR block such as 192.168.1.0/24.
- Run the calculation.
- Read or copy the network details.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
A /24 office network
{
"cidr": "192.168.1.10/24"
}A /8 private block
{
"cidr": "10.0.0.0/8"
}An RFC 3021 point-to-point /31
{
"cidr": "203.0.113.5/31"
}Limitations
CIDR notation, precisely
CIDR notation appends a prefix length to an IPv4 address: the number of high-order bits that identify the network. Everything below that boundary is host space, and the netmask and wildcard mask are just the two ways of writing that boundary.
The calculator keeps the arithmetic in unsigned 32-bit integers, so boundaries at 128 and above (a /1 through /7) do not overflow the way JavaScript's signed bitwise operators otherwise would.
Frequently asked questions
- Why does a /31 show two usable hosts?
- RFC 3021 defines /31 for point-to-point links so both addresses are usable; there is no network or broadcast address.
- What happens if I set host bits?
- The tool reports that host bits were set and normalises the input to the network address so the result is still correct.
Sources
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.