IPv4 Subnet Calculator – CIDR, Mask & Host Range

Calculate an IPv4 network, broadcast address, subnet mask, and usable host range locally.

Runs locally
Ready to calculate

Input without a prefix uses /32. /31 is interpreted as an RFC 3021 point-to-point link; this is not an IP discovery or network scan.

IPv4 network planning

How to calculate an IPv4 subnet from CIDR notation

Enter an IPv4 address such as 192.168.10.42/24 to calculate its subnet mask, network and last address, usable host range, address counts, and binary octets. Processing is entirely local. This tool is free to use. No account or payment is required.

Last updated

What you can do here

  • IPv4 and CIDR validation
  • Subnet and wildcard masks
  • Network and last address
  • Usable host counts
  • /31 and /32 handling
  • Binary octet breakdown
  • Copy subnet summary
  • Browser-local processing

How to use

  1. Enter a dotted-decimal IPv4 address with a prefix between /0 and /32.
  2. Click Calculate subnet to inspect the network, broadcast address, host counts and binary mask.
  3. Review the special /31 point-to-point and /32 individual-address rules when relevant.
  4. Copy the calculated summary and verify host assignments against your actual router or network policy.

CIDR prefixes and subnet masks

An IPv4 address uses 32 bits. A CIDR prefix /24 means the first 24 bits identify the network and the remaining 8 bits identify addresses inside that subnet. The corresponding mask is 255.255.255.0.

This calculator uses IPv4 arithmetic locally and displays both dotted-decimal and binary representations. It does not scan or contact any network endpoint.

Network, broadcast, and available host addresses

In ordinary IPv4 subnets, the first address names the network and the last is traditionally the broadcast address. The displayed conventional usable host count excludes those two addresses.

For a /31 point-to-point subnet, RFC 3021 permits both endpoints, so it has two usable addresses and no separate broadcast address. A /32 represents exactly one address. Actual address assignment depends on routing and local network conventions.

Example: calculate a /24 subnet

Check a host inside a 256-address private IPv4 subnet.

IPv4 / CIDR

192.168.10.42/24

Network and usable addresses

Network: 192.168.10.0/24; mask: 255.255.255.0; usable: 192.168.10.1–192.168.10.254

Common questions

Frequently asked questions

How many usable hosts are in a /24 subnet?

There are 256 total addresses and 254 conventional usable host addresses, excluding the network and broadcast addresses.

Why are /31 and /32 special?

RFC 3021 permits both addresses of a /31 point-to-point link. A /32 contains just one individual address, not a conventional network with broadcast.

Can this calculator scan my network or find my public IP?

No. It only performs arithmetic on the IPv4 address you enter in the browser.

Does a prefix-less address use /24?

No. A plain IPv4 address is treated as /32; enter an explicit prefix to calculate a broader subnet.

Looking for broader references? Browse all developer guides.