Skip to content
Toolars
Explore

IPv4 Subnet / CIDR Calculator

Calculate network, broadcast, wildcard mask, and usable hosts for any IPv4 CIDR or netmask, with /31 and /32 edge cases handled per RFC.

Task path / input to outcome

Enter an IPv4 address and prefix

Report bug

Local processing

Processing details

Tool inputs are processed on your device.

Resources may be downloaded to run this tool. Account services are separate.

Preparing offline use…

Privacy information

Task path / input to outcome

How to calculate an IPv4 subnet or CIDR block

  1. 01

    Enter an IPv4 address and prefix

    Type a plain IPv4 address such as 10.20.34.77, or paste it with an embedded CIDR prefix like 10.20.34.77/27. If the address carries no prefix, the second field accepts /0 through /32 — the leading slash is optional — or a contiguous dotted-decimal netmask such as 255.255.255.224. Each octet must be a decimal number from 0 to 255, and a mistake is reported with the exact octet or prefix that failed.

  2. 02

    Review the normalized subnet

    As soon as the input is valid, the result panel fills in live: the normalized CIDR, network address, broadcast behavior, first and last usable hosts, subnet mask, wildcard mask, and exact total and usable address counts. Every edit recomputes instantly, so you can compare two prefix lengths by changing a single digit and watching the host range move.

  3. 03

    Check edge-case semantics

    A /31 is identified as an RFC 3021 point-to-point subnet with two usable endpoints and no broadcast address. A /32 is shown as a single-host route with one usable address. Prefixes from /0 to /30 use standard network and directed-broadcast boundaries, where the usable count is the total minus two. A banner above the results names the semantics of the current prefix, so the special cases are never ambiguous.

  4. 04

    Read the binary and context panels

    The binary view renders the address, netmask, and network as dotted binary, which is the fastest way to see exactly which bits a mask covers. The context panel adds a scope label such as private use, loopback, link-local, documentation, or multicast, the address's ordinal position inside its network, and the historical class A through E — all derived from a static standards-based table, not a live registry lookup.

  5. 05

    Copy the values you need

    Every result row has its own copy button, and Copy all places the complete label-and-value list on the clipboard for pasting into a change record or ticket. Reset clears both fields for the next calculation. Parsing, mask arithmetic, binary rendering, and clipboard preparation all run inside the current browser tab.

Tool facts

Processing
In your browser
Input leaves this device
Never
Retention
Nothing is stored
Price
Free

Your input stays in the browser.

IPv4 Subnet/CIDR Calculator uses its verified local execution path and does not create a hidden input or output history.

Local execution

Runs inside the current browser tab.

No hidden processing

Active tool data never becomes a Toolars document record.

No account required

Use the core workflow without creating a profile. Favorites sync to your account after you sign in.

Immediate reset

Clear the tab and the active working data is gone.

What IPv4 Subnet/CIDR Calculator actually does

A network change request names only 10.20.34.77/27, but the firewall rule needs the network boundary, the wildcard mask for the ACL line, the broadcast address, and the usable host range. Paste the CIDR and the workspace answers all four at once: network 10.20.34.64/27, wildcard 0.0.0.31, broadcast 10.20.34.95, and usable hosts 10.20.34.65 through 10.20.34.94 — thirty of them. Copy each field straight into the change record, then open the binary view to confirm the mask boundary lands where the ticket claims. Internal addressing never leaves the device, so even unpublished network plans stay private.

Common questions

What inputs does the calculator accept?
One IPv4 address with an optional embedded CIDR prefix, plus a separate field that takes a prefix from /0 to /32 or a contiguous dotted-decimal netmask. If both fields specify a prefix they must agree, and the conflict is called out instead of being resolved silently. Octets are decimal and capped at 255; IPv6, CIDR merging, range-to-CIDR, and VLSM planning are outside this release.
Why does a /31 have no broadcast address?
RFC 3021 defines both addresses in a 31-bit prefix as usable endpoints on an IPv4 point-to-point link. The calculator therefore reports two usable hosts and marks broadcast as not applicable instead of applying the older network-and-broadcast subtraction rule. A /32 goes one step further: it is a single-host route with exactly one usable address.
What does a /0 produce?
A /0 describes the entire IPv4 space: 4,294,967,296 total addresses from network 0.0.0.0 to 255.255.255.255, with the standard rule subtracting two, leaving 4,294,967,294 usable hosts. It is rarely a real deployment prefix, but it is valid input and a useful sanity check on how the counts scale with prefix length.
Why is my netmask rejected as non-contiguous?
A valid netmask is a run of one-bits followed only by zero-bits, so 255.255.255.0 is accepted while 255.255.0.255 is not. The calculator checks the bit pattern of any dotted-decimal mask and refuses non-contiguous values, because they cannot be expressed as a CIDR prefix and produce meaningless host ranges. Convert the mask to its prefix length and enter that instead.
Are the scope and class labels authoritative ownership data?
No. Scope comes from a static standards-based table for familiar special-purpose blocks, and the class label is historical context derived from the first octet. The tool performs no live IANA, RIR, ASN, routing, geolocation, or ownership lookup, so the labels describe what an address block is for, not who currently holds it.
Are addresses uploaded or saved?
No. IPv4 parsing, mask arithmetic, binary rendering, copy preparation, and validation run locally. Raw addresses and results are not put into URLs, analytics, logs, remote requests, or browser storage; Reset or a reload clears the current input.

Related tasks, not a dead end.

Move into another focused workspace without returning to the full index.

URL Workbench

Clean URL lists with signed-link protection and per-line reasons. Compare components and export sitemaps.

Edit

JSON Explorer

Query JSONPath, extract fields and round-trip JSON Pointer records without losing large-number precision.

Inspect

JSON Schema Validator

Validate Draft 7 or 2020-12 locally with exact error paths; infer schemas from multiple observed samples.

Inspect

HTML Publishing

Clean pasted HTML for publishing while preserving lists, links and table semantics; preview changes safely.

Publish