StackPractices

CIDR & Subnet Calculator

Analyze IPv4 and IPv6 networks, split address space, plan VLSM allocations and detect overlapping CIDR blocks before they reach a firewall, VPC or Kubernetes NetworkPolicy. Unlike basic subnet calculators, this one also warns about risky scopes, converts ranges to exact CIDRs and summarizes overlapping rule lists. Everything runs locally in your browser.

1. Analyze a network

192.168.1.10/24 CIDR

192.168.1.10 255.255.255.0 netmask

192.168.1.10 - 192.168.1.30 range

2001:db8::/32 IPv6

2. Split the current network

Host sizing is conservative for IPv4: it reserves network and broadcast addresses. /31 point-to-point links remain a special case.

3. VLSM planner
4. Detect overlaps and summarize rules

Normalization removes redundant covered entries and merges exact sibling blocks without widening the matched address space.

Network analysis

IPv4 + IPv6
Normalized CIDR
—
Network
—
Netmask / prefix
—
Wildcard mask
—
Broadcast / end
—
First usable
—
Last usable
—
Total addresses
—
Usable addresses
—
Address scope
—

Security and routing analysis

Copy-ready configuration examples

Binary boundary visualization

network bits host bits

CIDR calculations without firewall-rule surprises

Most subnet calculators stop at network and broadcast addresses. Real infrastructure work starts after that: splitting a VPC allocation, fitting different segment sizes into one parent block, checking whether firewall rules overlap and reducing rule lists without accidentally widening access.

This tool treats an input like 192.168.1.10/24 as a host inside a network, normalizes it to 192.168.1.0/24 and tells you that host bits were set. That small detail prevents a common mistake: copying a host/prefix combination into a system that silently interprets it differently.

IPv4 prefixAddressesTraditional usable hostsTypical use
/1665,53665,534large VPC or campus block
/24256254small LAN or subnet
/266462small service segment
/3042legacy point-to-point link
/3122RFC 3021 point-to-point link
/3211single host route or rule

Frequently asked questions

What is CIDR notation?

CIDR notation writes an IP address together with a prefix length, such as 192.168.1.0/24. The prefix length says how many leading bits identify the network; the remaining bits identify addresses inside that network. It replaced classful A/B/C networking because it allows precise, non-wasteful address allocation.

How many usable hosts are in a /24?

An IPv4 /24 contains 256 addresses. In a traditional subnet, 254 are usable as host addresses because the first address is the network address and the last is the broadcast address. Smaller and larger prefixes follow the same power-of-two rule, with special handling for /31 point-to-point links and /32 host routes.

What is the difference between network, broadcast and usable host addresses?

The network address is the first address in an IPv4 subnet and identifies the subnet itself. The broadcast address is the last address and traditionally reaches all hosts in that subnet. The usable host range is normally everything between those two addresses. IPv6 does not use broadcast addresses.

How do I split a network into equal subnets?

Increase the prefix length. Each additional prefix bit doubles the number of subnets and halves the number of addresses in each one. For example, splitting 10.0.0.0/24 into four equal subnets requires two extra bits and produces four /26 networks. This calculator shows the resulting blocks explicitly.

What is VLSM?

Variable-Length Subnet Masking, or VLSM, allocates different subnet sizes inside one parent network based on actual host requirements. Instead of wasting a /24 for every segment, a planner might allocate a /23 for 500 hosts, a /24 for 200 hosts and smaller blocks for point-to-point links.

Why is 0.0.0.0/0 dangerous in firewall rules?

0.0.0.0/0 matches every IPv4 address, so using it as an allowed source exposes the service to the entire Internet. It is sometimes correct for intentionally public services, but it is a common cause of accidental exposure for databases, admin panels and internal APIs. The IPv6 equivalent is ::/0.

Does this calculator support IPv6?

Yes. It parses compressed and expanded IPv6 addresses, calculates prefix boundaries, displays the address in binary, splits IPv6 networks and checks IPv6 scopes such as link-local, unique-local, multicast and documentation ranges. IPv6 has no broadcast address; for normal prefixes the calculator treats the subnet-router anycast address as reserved, while /127 point-to-point and /128 host routes are handled specially.