🌐Subnet / CIDR Calculator

Enter an IPv4 address and CIDR prefix length to find network details.

Free Subnet / CIDR Calculator

This subnet calculator takes an IPv4 address and CIDR prefix length (like /26) and finds the subnet mask, network address, broadcast address, the range of usable host addresses, and the total number of usable hosts.

CIDR notation compactly expresses how many bits of an IP address are the network portion — a /24 means the first 24 bits identify the network, leaving 8 bits (256 addresses, 254 usable) for hosts. The calculator converts the prefix into the corresponding subnet mask and derives every other value from it.

Below the main result, a full table shows every possible prefix from /0 to /32 for your entered IP address, so you can compare network and broadcast addresses across every possible subnet size at a glance.

Useful for network engineering, subnetting practice, and infrastructure planning. Free, runs entirely in your browser.

About the Subnet / CIDR Calculator

Features

Full subnet breakdown

Mask, network, broadcast, and usable range in one place.

Any prefix, 0-32

Handles standard subnets plus special /31 and /32 cases.

Input validation

Clear errors for invalid IPs or prefixes.

Instant, private

Runs entirely in your browser. No data is sent anywhere.

Frequently Asked Questions

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation expresses a subnet mask as a slash followed by the number of network bits, like /24 — meaning the first 24 bits of the address identify the network.

What is a network address?

The network address is the first address in a subnet, with all host bits set to zero. It identifies the subnet itself and cannot be assigned to a host.

What is a broadcast address?

The broadcast address is the last address in a subnet, with all host bits set to one. Packets sent to it are delivered to every host on that subnet, and it cannot be assigned to an individual host.

Why are usable hosts 2 less than the total?

The first address (network) and last address (broadcast) in a subnet are reserved, so a /24 subnet has 256 total addresses but only 254 usable for hosts.

What's a subnet mask?

A subnet mask is the dotted-decimal equivalent of the CIDR prefix — it marks which bits of an IP address belong to the network portion (1s) versus the host portion (0s).

What are /31 and /32 subnets?

/32 is a single host address with no network/broadcast distinction. /31 is a special two-address subnet (commonly used for point-to-point links) where both addresses are usable, since there's no room for separate network and broadcast addresses.

How is the network address calculated?

Perform a bitwise AND between the IP address and the subnet mask — this clears all the host bits, leaving only the network portion.

Does this work for private IP ranges only?

No — it works for any valid IPv4 address, public or private (like 10.x.x.x, 172.16-31.x.x, or 192.168.x.x).

Does this calculator support IPv6?

No, this tool is for IPv4 addressing and CIDR only.

Is this calculator free to use?

Yes, completely free with no sign-up, and it runs entirely in your browser.