Subnet Calculator
Enter an IPv4 address and a prefix length from 0 to 32 to see the network address, broadcast address, subnet mask, wildcard mask, first and last addresses in the block, and the number of usable hosts. The arithmetic follows CIDR as described in RFC 4632 (retrieved 15 November 2026). For a /31 or /32 the usable-host count follows the usual special cases: two addresses on a /31 point-to-point link, and one address on a /32. This is addressing arithmetic, not a network-design service, and IPv6 is not modelled.
Subnet calculator
On this calculator: Ctrl+Enter copies the result, Shift+Alt+L copies a link to the current inputs, Shift+Alt+R resets, Shift+Alt+P opens Print / Save PDF. These shortcuts do not run while you type in a field, except Ctrl+Enter.
Saved results on this device
Stored only in this browser, not on our servers.
How to use the subnet calculator
- Type an IPv4 address. Use four dotted decimal octets, for example 192.168.1.10. Each octet must be an integer from 0 to 255.
- Enter the prefix length. This is the number after the slash in CIDR notation, from 0 to 32. A /24 is the familiar 255.255.255.0 mask.
- Read the block. The headline is the network address and prefix. Line items list the broadcast, mask, wildcard, first and last addresses, and the usable-host count.
How the block is computed
The engine turns the IPv4 address into a 32-bit integer, applies the prefix mask, and reports the network address (address AND mask) and the broadcast address (network OR the inverse mask). The first and last usable addresses are the network plus one and the broadcast minus one, except on a /31 or /32, where the whole block is treated as usable in the usual special-case way. Host counts are never invented from a vendor chart; they follow from the prefix length.
A prefix of 0 is the entire IPv4 space. A prefix of 32 is a single host. Both are valid inputs. Octets outside 0–255, a non-integer prefix, or a prefix outside 0–32 produce an error instead of a guessed block.
What this page is not
It is not IPv6, not a subnet-design wizard, and not a looking-glass. It will not recommend a prefix for a number of departments, and it will not apply VLSM automatically across several subnets. If you need several subnets, run the calculator once per prefix you already chose.
Copy result, Copy link, Reset, Print and Save PDF work as on the other tools. The diagram lists the network, broadcast, mask and host count, and is included in the report.
Worked identity (unit-tested)
- 192.168.1.10/24 → network 192.168.1.0, broadcast 192.168.1.255, 254 usable hosts.
That identity is tested against the same TypeScript function the browser runs. Report a mistake from the about box if a figure disagrees with RFC 4632 or with the arithmetic above.
Frequently asked questions
What is the block for 192.168.1.10/24?
Network 192.168.1.0, broadcast 192.168.1.255, mask 255.255.255.0, wildcard 0.0.0.255, first usable 192.168.1.1, last usable 192.168.1.254, and 254 usable hosts. That identity is unit-tested.
How are usable hosts counted on a /31 or /32?
A /32 is a single address (1 usable). A /31 is treated as a two-address point-to-point link (2 usable), which is the common RFC 3021-style special case. Prefixes of 30 or shorter subtract the network and broadcast addresses from the block size.
What document is this based on?
IPv4 CIDR prefix arithmetic as in RFC 4632, retrieved 15 November 2026. This page does not model IPv6, routing policy, or variable-length charts beyond a single prefix.
Does the host address have to be the network address?
No. You can type any address in the block; the engine masks it to the network address. 192.168.1.10/24 and 192.168.1.0/24 describe the same /24.
Is this a design or allocation service?
No. It will not pick a prefix for a site, reserve DHCP ranges, or look up a live routing table. Confirm allocations with your network documentation.
Why is IPv6 missing?
This page is IPv4 CIDR only. An IPv6 calculator would need a different address width and a different set of worked identities, and it is not bolted on here.
What is the wildcard mask?
It is the inverse of the subnet mask, bit for bit. For a /24 that is 0.0.0.255. Some access-list syntax uses that form; it is the same block, not a second kind of addressing.
Related calculators
Scientific Notation Converter – Numbers to a × 10ⁿ and Back
Numbers to scientific, E and engineering notation, and back to decimals.
Unit Converter
One converter for length, area, volume, weight, temperature, speed and more.
Scientific Calculator – Trig, Logs, Powers and Roots
Trigonometry, logarithms, powers, roots and factorials in degrees or radians, with a printable tape of the working.
Probability Calculator – Complement, Independent Events, nPr and nCr
Complement and odds, independent and/or, at least one in n trials, and nPr / nCr.
Ratio Calculator – Simplify, Solve and Split by Ratio
Simplify ratios, solve proportions and split a total by a ratio.
Sources and references
About this calculator
Written and maintained by Rashid Mehmood, founder of CalcTen. The formulas are unit-tested against hand-worked examples, and the content is reviewed whenever product sizes or guidance change. Last updated and reviewed 15 November 2026. See our editorial policy. If you spot a mistake, report it.
Results are calculated from the numbers you enter and shown with the working. Rounding is applied only when displaying results. Grade and GPA scales, and weighting rules, vary by school, so confirm with your institution. Read the disclaimer.