🌐 CIDR / IPv6 Subnet Calculator
Free online CIDR subnet calculator with full IPv4 and IPv6 support. Enter any CIDR notation to instantly get network address, broadcast address, subnet mask, usable IP range, and total usable IP count. All calculations run client-side — no data is ever sent anywhere.
🔢 Subnet Calculator
Enter a CIDR notation — e.g. 10.0.0.0/24 or 2001:db8::/32
✨ Key Features
- Full IPv4 and IPv6 CIDR support in one tool
- Instant calculation: network address, broadcast address, subnet mask
- Usable IP range (first and last assignable host) for IPv4
- Total usable IP count — handles huge IPv6 subnets
- Common example presets for quick reference
- 100% client-side JavaScript — no data transmitted
- Dark theme, responsive layout, works on desktop and mobile
What a Subnet Calculator Actually Computes
Every field in the result cards is derived from the two things you type — the network address and the prefix length. Given 10.0.0.0/24:
- Network address — the input address with the host bits zeroed out. For /24 that is 10.0.0.0; the subnet mask 255.255.255.0 keeps the first 24 bits.
- Broadcast address — the same address with all host bits set to 1 (10.0.0.255 for /24). IPv4 routers use it to reach every host in the block at once; for /31 and /32 it is defined but not routed.
- Usable IP range — the assignable hosts, which is network + 1 through broadcast − 1. That makes /24 hold 254 usable addresses even though the block technically contains 256.
- Subnet mask — the /prefix re-expressed in dotted quad form (255.255.255.0). For IPv6 the mask is a 128-bit pattern shown as
/32 (128-bit subnet mask)alongside the CIDR notation.
IPv4 vs IPv6 — where the maths changes
IPv4 addresses are 32 bits, so 1.2.3.4/24 and 1.2.3.4/25 differ only in which of the 8 host bits are zeroed. IPv6 addresses are 128 bits, which means the two numbers that break ordinary 64-bit integer arithmetic — 2^96 and 2^128 — appear in real subnets. This tool uses arbitrary-precision integers for the IPv6 path, so 2001:db8::/32 correctly reports 79,228,162,514,264,337,593,543,950,336 total addresses instead of the 2 you would get from an overflow-truncated shift.
IPv6 /31 and /127 subnets are special: RFC 7432 reserves them for point-to-point links, so the calculator marks them "N/A (point-to-point only)" rather than counting 2 hosts the way IPv4 /30 does. IPv6 /128 is a single host.
How to Read the Result Cards
- CIDR notation — the normalized form: network address + mask. Type
192.168.1.5/30and it shows192.168.1.4/30, because the network of a /30 containing .5 is .4. - Usable IPs — how many hosts you can assign. The two most common numbers people look up: /24 → 254, /28 → 14, /30 → 2.
- Total IPs — the full block size including network and broadcast. For /32 it reads "1 (single host)".
Common Prefix Sizes and What They Hold
- /24 — 256 addresses, 254 usable. The classic "one LAN segment" size.
- /28 — 16 addresses, 14 usable. The default subnet size on Windows networks.
- /30 — 4 addresses, 2 usable. One of the two usable pairs goes on each side of a point-to-point link.
- /31 — 2 addresses, both usable (RFC 3021). Exactly one link, two ends.
- /32 — 1 address. Loopback, single-host routing, documentation.
- IPv6 /32 — 2^96 addresses. This is the size of each allocation to an ISP; your actual network will be /48, /56 or /64 carved out of it.
- IPv6 /64 — the standard on-link subnet size. Slashes smaller than this break EUI-64 address generation on most interfaces.
Related Tools
❓ Frequently Asked Questions
Is the CIDR/IPv6 Subnet Calculator free to use?
Yes. It is completely free, with no sign-up, no usage limits and no watermarks. Enter as many subnets as you like, right in your browser.
Does the subnet calculator require an internet connection?
No. All subnet maths runs client-side in your browser — no input is sent to any server. Once the page has loaded it keeps working offline.
Does it support both IPv4 and IPv6 CIDR notation?
Yes. One input handles both: type an IPv4 address and the tool auto-detects the 0–32 prefix range, type an IPv6 address and it switches to the 0–128 range. No separate mode to pick.
What is the difference between network address and usable IP range?
The network address is the first address of the block and identifies the subnet itself. The usable IP range is the set of addresses that can be assigned to hosts — for IPv4 that excludes the network address and the broadcast address; for /31 and /32 point-to-point or single-host subnets the usable range is 'N/A'.
How many hosts does a /32 IPv4 address hold?
Exactly one. A /32 subnet is a single host address with no network or broadcast part — commonly used for loopback-style documentation or specific point-to-point cases on some platforms.
Will it show the correct total IP count for huge IPv6 subnets?
Yes. IPv6 totals go up to 2^128, far beyond what a 64-bit number can hold, so the tool uses arbitrary-precision (BigInt) arithmetic instead of shifting 1n by more than 127 bits — a bug that used to make every IPv6 /32 or /64 report 2 hosts instead of the real count. A /32 is 79,228,162,514,264,337,593,543,950,336 addresses (2^96).
Does it keep my subnet inputs private?
Yes. Nothing you type ever leaves the page. There is no telemetry, no server-side lookup, no analytics tied to your input values — the input box is read by JavaScript that runs entirely in your browser.