IP Subnet Calculator
Free ip subnet calculator with a clear formula and instant result
Free ip subnet calculator with a clear formula and instant result
Enter an IPv4 address and CIDR prefix to calculate the network, broadcast address and usable host count.
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.
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.
输入 IPv4 地址和 CIDR 前缀,计算网络地址、广播地址和可用主机数。
CIDR 前缀表示地址前多少位用于标识网络。/24 留下 8 位给主机,共 256 个地址,其中第一个是网络地址、最后一个是广播地址,因此可用主机为 254 个。前缀每变化 1,数量就减半或翻倍:/25 可用 126 个,/23 可用 510 个。
网络地址与广播地址被保留,不能分配给设备,因此可用数量比总数少 2。/31 是点对点链路的例外,两个地址都可用;/32 表示单个主机。若子网掩码未对齐到位边界,算出的网络地址会看起来与你输入的地址无关,因为主机位被直接掩成了零。
The network address and the broadcast address are reserved and cannot be assigned to devices.
The first 24 bits identify the network, leaving 8 bits for hosts, which is 256 addresses in total.
The host bits are masked to zero, so it shows the start of the block rather than your device address.
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
最近复核:2026 年 10 月 5 日 · 我们的计算方法 · 来源:公式用于参考;涉及专业决定时请核对适用条件