An IPv4 subnet calculation and host-range check using a CIDR prefix.

IP Subnet Calculator: Check an IPv4 CIDR Block

Enter an IPv4 address together with its prefix length to calculate the network, address range, and mask. An IP subnet calculation tool can save arithmetic, but its result depends on the prefix and the link type you supply. Check the returned boundaries before copying them into a network plan.

IP Subnet Calc: Enter an Address and Prefix

Open the OpenVPN subnet calculator and select the IPv4 calculator. Enter 192.0.2.130/26 in its address field and calculate the result. This documentation address is an example; substitute an authorized address and prefix for an actual plan. The expected output is:

Field Value
Network and prefix 192.0.2.128/26
Subnet mask 255.255.255.192
Broadcast address 192.0.2.191
Usual host range 192.0.2.129–192.0.2.190
Usual usable hosts 62

An IP subnet calculator uses the supplied prefix to determine which bits identify the network. An IP subnet calc can also display the mask in dotted notation. In the IP calculator, subnet results can be presented under different labels, such as first and last usable address. Compare the values rather than assuming that every tool uses the same field names.

Verify the calculation

An IPv4 address has 32 bits. A /26 prefix leaves six bits for positions within the block, giving 2^6 = 64 total addresses. The final mask octet is 192, or 11000000 in binary. Its block size is 256 - 192 = 64, so the last-octet blocks start at 0, 64, 128, and 192.

The input’s final octet, 130, falls in the block from 128 through 191. The network address is therefore 192.0.2.128, and the conventional broadcast address is 192.0.2.191. In a typical /26 LAN, the 62 addresses between them can be assigned to hosts. A subnet host calculator should show the same result when it applies that conventional rule.

You can verify the network address with a bitwise AND. The last octet of the input is 10000010; the last octet of the mask is 11000000. Their AND is 10000000, or 128. The first three octets remain unchanged because their mask octets are all 255. This check uses the actual prefix, not the address’s historical class.

A subnet mask calc converts the prefix into a dotted mask: /26 has 26 leading one bits, producing 255.255.255.192. If the displayed mask differs, recheck the prefix entered before interpreting the range. A wrong prefix can still produce a valid-looking result for a different block.

Interpret /31 and /32 separately

The familiar rule of subtracting two from the address count applies to conventional subnets with network and broadcast addresses. It is not a universal rule. On a point-to-point link configured for /31, RFC 3021 permits both addresses to identify endpoints. Confirm that both devices and the link configuration support this use.

A /32 identifies one IPv4 address and is commonly used as a host route or interface address. It is not a two-host LAN. Calculator displays vary for these special cases, so interpret a host count against the actual link and routing design instead of applying the /26 formula mechanically. RFC 4632 lists /31 and /32 alongside other prefix sizes.

Put the result into the plan

Record the network and prefix, mask, broadcast where applicable, usable range, intended gateway, and the link or VLAN that will use the block. A subnet calculator for IP addresses cannot establish that the block is assigned to your organization or that a gateway is free. Compare it with existing allocations and reservations before configuring devices.

Recalculate 192.0.2.130/26 and confirm the result is 192.0.2.128/26 with a final address of 192.0.2.191. Once the prefix, boundaries, and intended use agree, copy the verified values into the network plan.