DEADeveloper Engineering AtlasDeveloper workspace

Local · Your input stays in the browser

IPv4 CIDR Subnet Calculator

Calculate netmask, network, broadcast, total addresses, and usable ranges from IPv4/prefix.

Workspace

Guide and technical reference

How to use

Enter an IPv4 address with a CIDR prefix to calculate its canonical subnet locally in the browser. The result distinguishes the input host from the network, separates total from conventionally usable addresses, and applies point-to-point /31 and single-host /32 semantics. It does not support IPv6 or determine whether an address is assigned or reachable.

  1. Enter an IPv4 address followed by /prefix, such as 192.168.1.130/26.
  2. Read the canonical network and netmask before using the input address in an ACL or route.
  3. Compare total addresses with the usable range; ordinary subnets reserve network and broadcast addresses.
  4. Check the usage field for /31 point-to-point and /32 host-route behavior.

Examples

Input
192.168.1.130/26
Output
mask 255.255.255.192; network 192.168.1.128; broadcast 192.168.1.191; 64 total; 62 usable; 192.168.1.129–192.168.1.190

The entered host belongs to the canonical /26 beginning at .128.

Input
192.0.2.0/31
Output
2 total and 2 usable point-to-point endpoints; no separate broadcast

RFC 3021 semantics do not subtract network and broadcast from a /31 point-to-point link.

Input
192.0.2.5/32
Output
one host route containing 192.0.2.5; 1 total and 1 usable

A /32 identifies one address and never produces a negative usable count.

Input
192.0.2.1/33
Output
Prefix must be between 0 and 32

An out-of-range prefix is rejected and the previous result must not be treated as current.

Input
999.1.1.1/24
Output
Enter four decimal IPv4 octets between 0 and 255

Every IPv4 octet is validated before calculation.

Understanding the result

Netmask marks the fixed network bits; wildcard mask is its bitwise inverse and is often used in ACL notation.

Network is the first address of the canonical subnet. The entered address can be a host inside that subnet and need not equal network.

Broadcast is the last address for an ordinary subnet. /31 and /32 use purpose-specific semantics and therefore show no ordinary broadcast.

Total addresses equal 2^(32-prefix). Usable addresses follow conventional subnet rules, not evidence of actual allocation or connectivity.

Common errors and limitations

  • IPv6 is not supported by this calculator.
  • A mathematically usable address may still be reserved, already assigned, blocked, unrouted, or unreachable.
  • Both /31 addresses are usable only when the network is intentionally used as an RFC 3021 point-to-point link.
  • The calculation is local and sends no address to the DEA server.

Frequently asked questions

What does /24 mean?
It fixes the first 24 of 32 IPv4 bits, leaving eight host bits and 256 total addresses.
Why are two addresses not always subtracted?
Ordinary subnets reserve network and broadcast, but /31 point-to-point links use both endpoints and /32 identifies one host.
Does the calculator support IPv6?
No. Its parser and 32-bit calculations are specifically for IPv4.

← Back to all tools