Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Usable Hosts
254
in a /24 network
Network Address 192.168.1.0/24
Subnet Mask 255.255.255.0
Broadcast Address 192.168.1.255
Host Range 192.168.1.1 – 192.168.1.254
Total Addresses (Block Size) 256

What is an IP Subnet Calculator?

An IP subnet calculator takes an IPv4 address and a CIDR prefix (such as /24) and instantly works out the subnet mask, network address, broadcast address, the range of usable host addresses, and how many hosts the subnet can hold. It is an everyday tool for network engineers, sysadmins, and anyone studying for networking certifications. This tool covers standard IPv4 addressing and is not country-specific.

IPv4 32-bit address divided into network and host portions at the CIDR boundary
A CIDR prefix splits the 32-bit address into a network part and a host part.

How to use it

Enter the four octets of your IPv4 address (each 0–255) and choose a CIDR prefix from 0 to 32. The calculator applies the mask to the IP using a bitwise AND, then derives every related value. The headline figure is the number of usable hosts; the table below it lists the network, mask, broadcast, host range, and total address count.

The formula explained

The subnet mask is a 32-bit value with the leftmost p bits set to 1. The number of host bits is \(32 - p\), so the block size (total addresses) is \(2^{(32 - p)}\). Two of those are reserved — the network address (all host bits 0) and the broadcast address (all host bits 1) — giving $$\text{usable hosts} = 2^{(32 - p)} - 2$$ The network address itself is computed as \(\text{IP} \mathbin{\&} \text{mask}\).

Advertisement
Subnet range showing network address, usable host range, and broadcast address
The subnet spans from the network address to the broadcast address, with usable hosts in between.

Worked example

For 192.168.1.10/24: host bits = \(32 - 24 = 8\), block size = \(2^8 = 256\), usable hosts = \(256 - 2 = 254\). The mask is 255.255.255.0, the network is 192.168.1.0, the broadcast is 192.168.1.255, and the usable host range is 192.168.1.1 to 192.168.1.254.

FAQ

Why subtract 2 from the host count? The network and broadcast addresses cannot be assigned to a device, so they are removed from the usable total.

What about /31 and /32? A /31 is used for point-to-point links and provides 2 usable addresses (no broadcast reserved); a /32 represents a single host. This calculator handles those special cases.

Does it support IPv6? No — this tool is for IPv4 (32-bit) addressing only.

Last updated: