Subnet Calculator

Calculate network address, broadcast address and host range from an IP and CIDR.

Given an IPv4 address and a CIDR prefix, this calculates the subnet mask, network address, broadcast address, and usable host range — core information for any network configuration task.

Why the host count is always 2 less than expected

Every subnet reserves its first address for the network identifier and its last address for the broadcast address, neither of which can be assigned to a device — that's why a /24 subnet (256 total addresses) has only 254 usable host addresses, not 256.

Frequently asked questions

What does the CIDR prefix number actually mean?

It represents how many bits of the 32-bit IPv4 address are fixed as the network portion — a smaller number (/16) means a larger network with more hosts; a larger number (/28) means a smaller network with fewer hosts.

Why would I need this for home networking?

Most home routers handle subnetting automatically, but subnet calculations become necessary when configuring VLANs, static IP ranges, or troubleshooting connectivity between network segments.