How to Calculate IPv4 Subnets and Usable Hosts

Calculate IPv4 network, mask, broadcast, host range, and usable addresses from CIDR. IPv4 only—no VLSM planner.

By Haivix Team 8 min read
Abstract CIDR network grid and subnet blocks on a dark navy background

An IPv4 subnet is a bit-mask question: given an address and a prefix length, which addresses share the network, which is broadcast, and how many hosts can you assign? Getting the mask wrong is a common source of “it pings here but not there.”

The Haivix Subnet Calculator does that math locally. Enter dotted IPv4 with optional CIDR (default example 192.168.1.10/24). Missing prefix defaults to /24. You get canonical IP/prefix, network, broadcast, subnet mask, wildcard mask, host range, usable and total address counts, and whether the block is RFC1918 private or “public or special-use.”

How to read the outputs

Network and broadcast bound the block. The host range is first usable through last usable. For a typical prefix, usable count is total addresses minus two (network and broadcast). /32 is a single address (one usable). /31 uses both addresses as usable, which matches point-to-point practice.

Scope is RFC1918 only: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 show as Private IPv4. Loopback, link-local, CGNAT, multicast, and documentation ranges are labeled public or special-use—they are not classified further.

What this calculator will not do

IPv4 only. No IPv6, no VLSM planner, no “how many /27s fit in this /24,” no ACL designer, and no DNS or WHOIS. Binary or dotted-decimal conversion belongs in the IPv4 Converter. Looking up a hostname is a DNS Lookup job.

Invalid octets or a prefix outside 0–32 produce a clear error. Calculation runs on load, on Calculate, and when you press Enter.

A practical way to use the report

Paste the interface address you actually configured, including prefix. Compare the computed network with the route you advertised. If two hosts should talk and sit in different computed networks, the mask is the first thing to fix.

Copy results copies the full report text for a ticket or change record. Addresses are not sent to Haivix.

Subnet checklist before you change a LAN

Open the Subnet Calculator, enter the CIDR, read network through usable count, and copy the report if you need it in a change ticket.

  • Prefix length matches the intended size (not a leftover /24).
  • Gateway sits inside the host range.
  • DHCP pool does not include network or broadcast.
  • /31 or /32 is intentional for that link or host route.
  • Private vs public label matches how you will route and NAT.
  • IPv6 or VLSM planning is happening in a tool that supports it.