TK TaskKit
Developer Tools

CIDR Calculator

Compute IPv4 and IPv6 subnet info from CIDR notation: network, host range, total addresses, masks, scope, classful info.

IPv4
IPv6

192.168.1.0/24

IPv4Class CPrivateScope: Private (RFC 1918)
Network192.168.1.0
Broadcast192.168.1.255
First address192.168.1.0
Last address192.168.1.255
First host192.168.1.1
Last host192.168.1.254
Netmask255.255.255.0
Wildcard0.0.0.255
Prefix/24
Total addresses256
Usable hosts254
Binary network11000000.10101000.00000001.00000000
Binary netmask11111111.11111111.11111111.00000000

Inputs stay on this device. Every developer tool on TaskKit runs entirely in your browser. Tokens, payloads, and pasted text are not transmitted to TaskKit servers or third parties.

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 /22 give 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