Skip to content
Hack Your WorldSoftware · Infrastructure · Home automation

Tools / Networking

IPv4 subnet calculator

Find the network, subnet mask, broadcast address, and host range for an IPv4 address and CIDR prefix. The calculator handles /31 point-to-point links and /32 routes separately.

Enable JavaScript to calculate. The worked example below is available without it.

Calculation code runs locally in your browser and does not submit these fields. Shared links include your inputs after the # sign; do not share private network details.

Example: 192.168.50.130/26

A /26 contains 64 addresses. This address belongs to 192.168.50.128/26, with mask 255.255.255.192. The conventional host range is 192.168.50.129 through 192.168.50.190; 192.168.50.191 is the directed broadcast address. That leaves 62 host slots before any gateway, DHCP exclusions, or platform reservations.

What the result means

The prefix fixes the network bits; the remaining bits give 232 − prefix addresses. The network is the aligned beginning of that block. For prefixes through /30, this tool excludes the first and last address when showing the conventional host range. A wildcard mask is the inverse of the subnet mask; it is shown for reference, not as a ready-to-deploy firewall rule.

A /31 is treated as a two-endpoint point-to-point link under RFC 3021. There is no directed broadcast address on that link. Both devices must support this use; it is not a suggestion to configure a two-address ordinary LAN. A /32 identifies one address.

This is address arithmetic, not an allocation or reachability check. It does not inspect your network, detect overlaps, choose a gateway, or make reserved and special-purpose ranges usable. Cloud providers can reserve additional addresses. A /0 calculation describes the entire IPv4 block, not a usable LAN.

If you are planning an off-site backup over that network, the backup-window calculator checks whether the daily transfer fits the time available.