What is the Network & Broadcast Address Calculator?
This tool takes an IPv4 address and a CIDR prefix (such as /24) and computes the network address, broadcast address, subnet mask, usable host range, and the number of addresses in the subnet. It is a universal networking tool based on standard IPv4 bitwise arithmetic and works for any private or public address.
How to use it
Enter the four octets of the IPv4 address (each 0–255) and the subnet prefix length (0–32). Press calculate to see the network and broadcast boundaries plus host counts. For example, the host 192.168.1.130/24 belongs to the network 192.168.1.0 with broadcast 192.168.1.255.
The formula explained
An IPv4 address and its subnet mask are 32-bit numbers. The mask for a /n prefix has its top n bits set to 1 and the rest to 0. The calculations are pure bitwise operations:
$$\text{Network} = \text{IP} \mathbin{\&} \text{Mask} \qquad \text{Broadcast} = \text{Network} \mid \overline{\text{Mask}}$$network = IP AND mask — clears all host bits, leaving the subnet base. broadcast = network OR (NOT mask) — sets every host bit to 1, giving the highest address in the subnet. The total address count is \(2^{32-n}\); usable hosts are that minus 2 (one network, one broadcast) for prefixes up to /30: $$\text{Usable Hosts} = 2^{\,32 - \text{/n}} - 2$$
Worked example
For 10.0.0.200 /26: the /26 mask is 255.255.255.192. \(200 \mathbin{\&} 192 = 192\), so the network is 10.0.0.192. Host bits = 6, so total = \(2^{6} = 64\) addresses, broadcast = 10.0.0.255, and usable hosts = \(64 - 2 = 62\).
FAQ
Why subtract 2 for usable hosts? The network address (all host bits 0) and the broadcast address (all host bits 1) cannot be assigned to devices.
What about /31 and /32? A /31 is a point-to-point link with 2 usable addresses (RFC 3021); a /32 is a single host. This calculator reports those special cases.
Does the host part of the input matter? No — any address inside the subnet yields the same network and broadcast, because the host bits are masked off.