What this tool does
A CIDR calculator for both IPv4 and IPv6. Given a notation like 10.0.0.0/24 or 2001:db8::/48, it computes the network address, broadcast (v4) or last address (v6), host range, total addresses, masks, and the address scope (loopback, link-local, ULA, multicast, global unicast). For IPv4 it also reports the legacy classful info.
When you'd use it
- Sizing a subnet for a new VPC — how many usable hosts does
/22give you? - Splitting a parent block into smaller subnets without dragging out a calculator.
- Confirming whether an address falls inside a private range (RFC 1918 / ULA / link-local).
- Checking that two CIDR blocks don't overlap before merging routes.
How it works
IPv4 math runs on 32-bit integers. IPv6 math uses BigInt — addresses are 128 bits, which JavaScript numbers can't represent exactly. Compressed IPv6 forms (2001:db8::1) follow RFC 5952 for canonicalization: lowercase hex, single :: for the longest run of zeros, no leading zeros in groups.
Scope detection compares the address against well-known prefixes: 127.0.0.0/8 and ::1/128 for loopback, 10/8 + 172.16/12 + 192.168/16 for RFC 1918, fc00::/7 for ULA, 169.254/16 and fe80::/10 for link-local, 224/4 and ff00::/8 for multicast.
Notes
Does /24 give me 256 hosts? No, 254. The first address is the network address and the last is the broadcast — neither is a usable host. IPv6 doesn't have this rule, so a /64 really does give you 2⁶⁴ usable addresses.
What's classful info for? Pre-CIDR (1993), IPv4 was divided into Class A/B/C ranges by the leading bits. The classes are deprecated but still appear in old documentation, so we display them for context.
Does /0 work? Yes — that's the entire address space. Useful as a default route in route tables.
Related tools
- Hash Generator — for fingerprinting addresses or routes
- Regex Tester — for validating address inputs in your own code