Connect via MCP →

Enter Calculation

Formula

Show calculation steps (1)
  1. Usable Hosts

    Usable Hosts: Network & Broadcast Address Calculator

    Total addresses = 2 raised to the host bits (32 minus prefix). Usable hosts = total minus 2 (network + broadcast), except /31 gives 2 and /32 gives 1.

Advertisement

Results

Network Address
192.168.1.0/24
Broadcast: 192.168.1.255
Broadcast Address 192.168.1.255
Subnet Mask 255.255.255.0
First Usable Host 192.168.1.1
Last Usable Host 192.168.1.254
Usable Hosts 254
Total Addresses 256

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$$

Advertisement
Bitwise breakdown of an IPv4 address split into network and host portions by a CIDR prefix
A 32-bit IPv4 address divided into network bits (set by the mask) and host bits.

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\).

Diagram showing network address, host range, and broadcast address on a number line of a subnet
Network address at the start, usable host range in the middle, broadcast address at the end.

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.

Last updated: