Subnet Calculator

CIDR math: range, mask, count, broadcast.

Error: Provide CIDR like 192.168.1.0/24

About Subnet Calculator

Enter any CIDR block like 192.168.1.0/24 or 2001:db8::/32 and the tool returns the full subnet breakdown. For IPv4 you get the network address, broadcast address, first and last usable host, netmask in dotted decimal, and the count of usable hosts after reserving network and broadcast. For IPv6 the size is reported in powers of two because the ranges are too large to enumerate.

When to use it

Use this when designing a network and you need to size subnets for VLANs, DHCP scopes, or VPC routing tables. Run it to translate between CIDR prefixes and netmask form, especially when migrating between firewalls that expect different formats. It also helps when reviewing routing tables to understand exactly which addresses a /28 or /22 covers.

How to read the results

For IPv4, usable hosts is 2^(32 - prefix) - 2, reserving the network address and the broadcast. A /24 gives 254 usable hosts. A /30 gives 2, suitable for point-to-point links. A /31 has special handling in RFC 3021 and yields 2 hosts with no broadcast. IPv6 subnets typically use /64 for end networks, providing 2^64 addresses, which is more than the entire IPv4 internet several times over.

Frequently asked questions

Why does a /24 only give 254 hosts, not 256?

IPv4 reserves the first address as the network identifier and the last as the broadcast address. With 256 total addresses in a /24, that leaves 254 usable for actual hosts. The /31 and /32 prefixes have special rules that change this.

What is the difference between netmask and prefix length?

They express the same thing in different notation. /24 is the prefix length, which corresponds to a netmask of 255.255.255.0. The prefix is more compact and is preferred in modern routing tables and documentation.

Should I always use /64 for IPv6 LANs?

Yes for most cases. IPv6 stateless address autoconfiguration requires a /64. Smaller IPv6 subnets break SLAAC and break many host configurations. Larger blocks like /48 are assigned per site and then split into many /64s internally.

Can I overlap subnets?

Routing tables resolve overlaps using longest prefix match. The most specific (largest prefix number) wins. While the math allows overlaps, network designs avoid them because they make traffic flow non-obvious and audit difficult.

Who Is Online

In total there are 7 users online: 0 registered, 4 guests and 3 bots.

Bots: Baiduspider Bingbot Other Bot

Users active in the past 15 minutes. Total registered members: 340