Subnet Calculator
Enter an IPv4 address and CIDR prefix length (e.g. 192.168.1.10 /24) to calculate the subnet's details.
/
How It Works
The subnet mask, derived from the CIDR prefix length, is applied to the IP address to find the network address (all host bits zeroed) and broadcast address (all host bits set to one). The usable host range is everything between them.
Formula
Network Address = IP AND Subnet Mask. Broadcast Address = Network Address OR (NOT Subnet Mask). Usable Hosts = 2^(32 − prefix length) − 2.
Example
192.168.1.10/24 has network address 192.168.1.0, broadcast address 192.168.1.255, and 254 usable host addresses.
Frequently Asked Questions
- Why subtract 2 from the total addresses for usable hosts?
- The first address in a subnet is reserved as the network address and the last is reserved as the broadcast address, so neither can be assigned to a host (except for /31 and /32 networks, which use special rules).
- What does the prefix length mean?
- The CIDR prefix length (e.g. /24) is the number of leading bits in the 32-bit address used for the network portion — the remaining bits identify hosts within that network.
Related Calculators
- Percentage CalculatorCalculate percentages three ways: find X% of a number, find what percent one number is of another, or find percentage change.
- Scientific CalculatorA full-featured online scientific calculator with trigonometric, logarithmic and exponential functions, keyboard support included.
- Fraction CalculatorAdd, subtract, multiply or divide two fractions and get the simplified result.
- Algebra CalculatorSolve a linear equation of the form ax + b = 0.
- Area CalculatorCalculate the area of a square, rectangle, triangle or circle.
- Average CalculatorCalculate the average (mean) of a list of numbers.