I earn commissions when you sign up or buy through the affiliate links on this page, at no extra cost to you.

Homelab · Tool · By Mohammed Almuhanna

IPv4 and IPv6 Subnet and CIDR Calculator

Network

Examples

Set a prefix larger than the network prefix to break it into equal subnets. Works for IPv4 and IPv6.

VLSM planner: size subnets to host counts

List the subnets you need and how many hosts each must hold. I size each one to the smallest block that fits and pack them largest-first so they stay aligned.

More tools: overlap and summarize

Do two networks overlap?

Summarize networks into one block

Coverage: does a parent cover these children?

Embed this calculator on your site (free)

Free to use. The snippet is the calculator plus a one-line credit link, which is all I ask in return. It follows your visitor's light or dark setting automatically; add ?theme=light or ?theme=dark to the URL to pin it to your site.

Enter a network in CIDR notation and the calculator works it out. For IPv4, like 192.168.1.0/24, you get the subnet mask, wildcard mask, network and broadcast addresses, the usable host range, and the host count. You can split a network into equal subnets, or open the VLSM planner to size subnets to real host counts and pack them into the block largest-first. For IPv6, like 2001:db8::/64, you get the network, first and last addresses, total address count, and address type.

Subnet calculator FAQ

How do I use this subnet calculator?

Type a network in CIDR notation, like 192.168.1.0/24 for IPv4 or 2001:db8::/64 for IPv6, and it works out the network and broadcast addresses, the subnet mask and wildcard, the usable host range, and the host count. Leave the prefix off and it assumes /24 for IPv4 and /64 for IPv6. Every result has a shareable URL.

What is CIDR notation (the /24 part)?

The number after the slash is the prefix length: how many bits of the address are the network portion, counted from the left. /24 means the first 24 bits are the network and the last 8 are hosts, so 256 addresses and 254 usable. A smaller number is a bigger network: /16 is 65,536 addresses, /8 is about 16 million.

What is VLSM, and what does the visual planner do?

VLSM (variable-length subnet masking) is carving one network into subnets of different sizes instead of equal ones, so each subnet gets only the addresses it needs. The VLSM planner sizes subnets to the host counts you enter and packs them largest-first so they stay aligned. The visual planner is hands-on: click Divide to split a block in half, as deep as you want, and use the Join brackets on the right to merge blocks back. The whole layout saves to the URL, so you can share a plan.

Does it handle IPv6?

Yes. Enter an IPv6 network like 2001:db8::/64 and you get the network, the first and last addresses, the expanded (uncompressed) form, the total address count, the reverse-DNS zone, and counts of the nested /48, /56, and /64 blocks. You can split an IPv6 block into equal subnets too.