Skip to content
CALX
Appearance

Appearance

Mode


Palette

IPv4 subnet calculator

network = address AND mask

Enter an IPv4 address and a prefix (CIDR like /24, or a decimal mask like 255.255.255.0): the tool computes the network address, the mask and wildcard mask, the broadcast address, the first and last usable address, the total number of addresses and usable hosts, and the address type (private, public, loopback, link-local, multicast, reserved).

Enter a CIDR prefix ("/24" or "24") or a decimal mask ("255.255.255.0").

Scientific dossier


What the tool computes, what it assumes, where it stops being valid, and where its data comes from.

Method & formulasnetwork = address AND mask

network = address AND mask

broadcast = network OR wildcard mask

address count = 2^(32 − prefix length)

The prefix (e.g. /24) fixes how many high-order bits are reserved for the network: the remaining bits identify hosts within that network. Every other value (mask, broadcast, usable range) is derived from these two numbers.

CIDR
· the "address/prefix" notation (e.g. 192.168.1.0/24) that replaced classes A/B/C in 1993 (RFC 1519).
Wildcard mask
· the complement of the subnet mask, used notably in Cisco access control lists (ACLs).
Broadcast address
· the last address in the range, reserved to reach every host in the subnet at once.
/31 (RFC 3021)
· special case for point-to-point links: both addresses in the range are usable, with no reserved network or broadcast.
/32
· a prefix designating a single address (a route or a single host).
Validity domainThe historical A/B/C/D/E class system (shown for information only) is no longer the modern routing method: since 1993, all IPv4 routing uses CIDR, where the network size is fixed by the prefix rather than by the value of the first octet.

The historical A/B/C/D/E class system (shown for information only) is no longer the modern routing method: since 1993, all IPv4 routing uses CIDR, where the network size is fixed by the prefix rather than by the value of the first octet. This tool accepts a decimal mask in addition to CIDR, but explicitly rejects a non-contiguous mask (e.g. 255.255.0.255) rather than guessing an arbitrary prefix from it.

Example192.

192.168.1.42/24: mask 255.255.255.0, network 192.168.1.0, broadcast 192.168.1.255, usable range from 192.168.1.1 to 192.168.1.254 (254 hosts), private address (RFC 1918).