How to Use the IPv4 Subnet Calculator
- Enter a valid IPv4 address.
- Select the desired subnet mask or CIDR prefix.
- Click the calculate button to see network details.
Formulas and Technical Logic
Subnetting uses bitwise operations on 32-bit IP addresses. The Network Address is calculated by performing a logical AND between the IP address and the Subnet Mask. The Broadcast Address is calculated by performing a logical OR between the Network Address and the inverted Subnet Mask. Host Capacity is calculated as 2^(32-prefix) – 2.
Key Features
- Instant calculation of network and broadcast addresses.
- Usable host range identification.
- CIDR to subnet mask conversion.
- Identification of IP class and private/public status.
Reference Table: Common Subnets
| CIDR | Subnet Mask | Usable Hosts |
|---|---|---|
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
Frequently Asked Questions
What is a subnet mask?
A subnet mask separates an IP address into the network and host portions.
Why subtract 2 from total hosts?
The first address is reserved for the network identifier. The last address is reserved for the broadcast address.