Tool developed by Ugo Candido. Content reviewed by the CalcDomain Network Engineering Editorial Board.
Last accuracy review:
A precise IPv4 subnet tool for engineers, students, and IT pros. Enter an IP and prefix (or mask) to get the network, broadcast, host range, class, wildcard mask, and private/public status — with formulas and a worked example.
Enter four octets (0–255) separated by dots, e.g., 10.0.0.1.
/n where n is the number of 1-bits in the subnet mask (0–32). Example: /24 = 255.255.255.0.
Dotted-decimal mask. If provided, this will overwrite the prefix length after validation.
Primary sources:
Let prefix be \( p \) (0–32). Subnet mask has \( p \) ones followed by \( 32-p \) zeros.
Number of addresses: \( N = 2^{32-p} \)
Usable hosts (for \( 0<p<31 \)): \( U = \max(0,\,N - 2) \)
Network address: \( \text{net} = \text{IP} \,\&\, \text{mask} \)
Broadcast: \( \text{bcast} = \text{net} \,|\, \lnot \text{mask} \)
First host: \( \text{net} + 1 \) (if \( U>0 \))
Last host: \( \text{bcast} - 1 \) (if \( U>0 \))
Suppose IP = 192.168.1.10, prefix = /24.
255.255.255.0. Wildcard = 0.0.0.255.192.168.1.0; Broadcast = 192.168.1.255.192.168.1.1; Last host = 192.168.1.254.The prefix (e.g., /24) is the count of 1-bits in the mask. The mask is the dotted-decimal representation of those bits (e.g., 255.255.255.0).
They identify the subnet itself (all host bits 0) and the broadcast address (all host bits 1). In point-to-point /31 and loopback /32 scenarios, special rules apply.
Private ranges per RFC 1918: 10/8, 172.16/12, 192.168/16. The calculator flags these.
On point-to-point links, /31 uses both addresses and omits broadcast (RFC 3021). This tool reports usable hosts accordingly (0 traditional, but both addresses usable on P2P).
This page focuses on IPv4. Use a dedicated IPv6 calculator for 128-bit addressing and different rules.
It’s the inverse of the subnet mask, commonly used in ACLs and some router configurations to match address ranges.
Legacy classful ranges based on the first octet: A (0–127), B (128–191), C (192–223). Modern networks use CIDR rather than classful boundaries.
Tool developed by Ugo Candido. Content reviewed by the CalcDomain Network Engineering Editorial Board.
Last accuracy review: