Home› Cybersecurity›IP Subnet / CIDR Calculator
Cybersecurity tool

IP Subnet / CIDR Calculator

Enter an IPv4 address and prefix length to calculate network, broadcast, mask, wildcard and host range.

Calculate an IPv4 subnet from CIDR

Enter an IPv4 address and prefix length to calculate network, broadcast, mask, wildcard and host range.

Network address—
Broadcast address—
Subnet mask—
Wildcard mask—
Total addresses—
Usable host addresses—
First host—
Last host—

How the IP subnet / CIDR calculator works

IPv4 addresses contain 32 bits. A CIDR prefix such as /24 means the first 24 bits identify the network while the remaining eight bits identify addresses inside that block. The subnet mask is the same prefix shown in dotted decimal, and the wildcard mask is its bitwise inverse.

Network, broadcast and host range

For conventional subnets up to /30, the first address is the network address and the last is the broadcast address, so the calculator excludes both from the usable-host count. It treats /31 as a point-to-point special case and /32 as a single-host route.

Use cases

Network engineers and IT support teams can use the tool to validate firewall objects, DHCP ranges, route summaries, VLAN plans and address allocations without converting bits manually.

IPv4 only

This page intentionally focuses on IPv4. IPv6 uses 128-bit addressing, hexadecimal notation and different subnetting conventions, so it should not be forced into an IPv4 calculator.

Frequently asked questions

What does /24 mean?
It means 24 of the 32 IPv4 bits are the network prefix, leaving 8 bits for addresses in the subnet.
How many addresses are in a /24?
A /24 contains 256 total IPv4 addresses; in a conventional LAN subnet, 254 are typically usable host addresses.
Why does /31 show two usable addresses?
A /31 is a special point-to-point subnet convention that can use both addresses as endpoints rather than reserving network and broadcast addresses.
Does this calculator support IPv6?
No. It is deliberately an IPv4 CIDR calculator.