Skip to content · 跳到主要内容

IP Subnet Calculator

Free ip subnet calculator with a clear formula and instant result

Network
--
--
Broadcast
--
Usable hosts

IP Subnet Calculator

Enter an IPv4 address and CIDR prefix to calculate the network, broadcast address and usable host count.

network = address AND mask
hosts = 2^(32 − prefix) − 2

What the numbers mean

A CIDR prefix states how many leading bits identify the network. A /24 leaves eight bits for hosts, giving 256 addresses, of which the first is the network address and the last is broadcast, so 254 are usable. Each step in the prefix halves or doubles the count: a /25 gives 126 usable hosts and a /23 gives 510.

Why the host count is two short

The network and broadcast addresses are reserved and cannot be assigned to a device, which is why the usable count is two less than the block size. A /31 is an exception for point-to-point links where both addresses are usable, and a /32 identifies a single host. If a subnet mask does not align to a bit boundary, the calculated network address can look unrelated to the one you typed, because the host bits are simply masked to zero.

Frequently Asked Questions

Why is the host count two less than the block size?

The network address and the broadcast address are reserved and cannot be assigned to devices.

What does /24 mean?

The first 24 bits identify the network, leaving 8 bits for hosts, which is 256 addresses in total.

Why is the network address different from my IP?

The host bits are masked to zero, so it shows the start of the block rather than your device address.

Does this support IPv6?

No. It handles IPv4 and CIDR prefixes, where the classic network and broadcast rules apply.

Last reviewed: October 5, 2026 · How we calculate · Sources: Published formula reference; verify domain-specific assumptions before making a decision