Network

Subnet & CIDR Calculator

CIDR math for IPv4 and IPv6 — network, broadcast, first/last host, subnet mask, and total addresses.

Subnet calculator

Enter a CIDR — IPv4 or IPv6 — to see the network and host range.

All math runs in the browser. Examples: 10.0.0.0/24, 192.168.1.5/30, 2001:db8::/32.

Results

Run a lookup to see structured results here.

Practical guide

How to use the subnet calculator

Subnetting is the part of networking everyone re-derives every few months. This calculator and the explanations below take the guesswork out of the math whether you are sizing a VPC, allocating a customer block, or studying for a certification.

What this tool checks

Enter any IPv4 or IPv6 address in CIDR notation — for example 10.0.0.0/24 or 2001:db8::/32 — and the calculator returns the network address, broadcast address, usable host range, total addresses, and the equivalent subnet mask. It accepts both classful and classless inputs and normalizes them into their canonical form.

When to use it

Use it before assigning a new VPC or VLAN, when planning a network migration, while answering certification practice questions, when troubleshooting a route that is supposed to cover an entire subnet, or when handing a block to a customer and you need the exact host range that fits inside the prefix. It is also useful for sanity-checking an existing setup — paste in the subnet and confirm the broadcast is what you expected.

How to read the result

The network address is the first address in the block and identifies the subnet itself. The broadcast address is the last and is reserved in IPv4. Everything in between is assignable. The mask (or prefix length) tells routers and operating systems how to split incoming addresses into network and host portions. Total addresses is 2^(32 − prefix) for IPv4 and 2^(128 − prefix) for IPv6.

Common errors and what they mean

If the calculator complains that the address does not match the prefix, the host bits are non-zero — for example, 192.168.1.5/24 is really inside 192.168.1.0/24 and the calculator will normalize. A /33 or larger for IPv4 is invalid because IPv4 addresses are 32 bits. For IPv6, you cannot exceed /128. Subnets larger than /24 (smaller prefix number) in IPv4 cross what used to be class-B boundaries and behave the same way today.

Example: planning a /28 for a small VLAN

Example input
10.50.10.0/28
Example result
Network:   10.50.10.0
Broadcast: 10.50.10.15
Host range: 10.50.10.1 — 10.50.10.14
Mask:      255.255.255.240
Total:     16  (14 usable)

A /28 is a common size for a small server VLAN: 14 usable hosts is enough for a rack of appliances plus a gateway and reserved address, without burning a full /24.

Related tools

Related guides

FAQ

What does a /24 mean in CIDR notation?
The number after the slash is the prefix length — how many bits at the start of the address belong to the network. A /24 has 24 network bits and 8 host bits, which gives 256 total addresses (254 usable in IPv4 once you subtract the network and broadcast). /16 is 65,536 addresses, /28 is 16. The full cheat sheet lives in the Subnetting for Beginners guide.
Why does the calculator subtract two addresses in IPv4 but not in IPv6?
In IPv4 the first address in a subnet is the network address and the last is the broadcast — neither can be assigned to a host. IPv6 dropped broadcast entirely (it uses multicast instead) and the all-zeros address is reserved but the all-ones is usable. For IPv6 the calculator reports the full range as the host range.
What is the difference between a netmask and a CIDR prefix?
They express the same thing two different ways. A /24 prefix is the same as the netmask 255.255.255.0. CIDR notation is shorter and is what every router, cloud console, and modern config file expects today. Older systems still accept dotted-decimal netmasks and the calculator shows both.
Can I split a /24 into smaller subnets here?
The current calculator solves one subnet at a time — give it a CIDR block and it returns the network address, broadcast, host range, and total addresses. To plan VLSM (variable-length subnet masks) by hand, work in binary or use the cheat sheet in the Subnetting for Beginners guide. A built-in VLSM splitter is on the roadmap.
Is /31 really usable for point-to-point links?
Yes — RFC 3021 defines /31 as a valid two-address subnet for point-to-point links between routers, with neither address reserved. /32 is used for a single-host route, typically on a loopback interface. The calculator handles both correctly and will report 2 usable hosts for /31.

Last reviewed: 2026-05-19.