- Choose Input Mode: Select "IP + CIDR" to enter a CIDR prefix like /24, or "IP + Subnet Mask" to enter a dotted decimal mask like 255.255.255.0. Both methods produce identical results.
- Enter the IP address. This can be a host IP or the network address. The calculator will find the correct network address automatically by ANDing the IP with the subnet mask.
- Enter the prefix length or subnet mask. Common values: /24 (254 hosts), /16 (65,534 hosts), /8 (16.7M hosts). The /30 prefix (2 usable hosts) is popular for point-to-point links.
- Read the results: Network address (first IP in range), broadcast address (last IP), first and last usable host IPs, the total usable host count, subnet mask in dotted decimal and hex, wildcard mask, and IP class.
- Use the binary panel to see exactly which bits belong to the network portion and which are host bits. The CIDR table at the bottom shows all common prefixes as a reference.
Subnet Calculator
Calculate network address, broadcast address, usable host range, and subnet mask from IP address and CIDR notation.
Input Mode:
Network: 192.168.1.0/24
| IP Address | 192.168.1.0 |
| Network Address | 192.168.1.0 |
| Broadcast Address | 192.168.1.255 |
| First Usable Host | 192.168.1.1 |
| Last Usable Host | 192.168.1.254 |
| Usable Hosts | 254 |
| Subnet Mask | 255.255.255.0 |
| Subnet Mask (Hex) | FF.FF.FF.00 |
| Wildcard Mask | 0.0.0.255 |
| CIDR Notation | /24 |
| IP Class | C |
Binary Representation
IP Address
11000000.10101000.00000001.00000000
Subnet Mask
11111111.11111111.11111111.00000000
Network Addr
11000000.10101000.00000001.00000000
Broadcast
11000000.10101000.00000001.11111111
| CIDR | Subnet Mask | Usable Hosts | Total IPs |
|---|---|---|---|
| /32 | 255.255.255.255 | 1 | 1 |
| /31 | 255.255.255.254 | 2 | 2 |
| /30 | 255.255.255.252 | 2 | 4 |
| /29 | 255.255.255.248 | 6 | 8 |
| /28 | 255.255.255.240 | 14 | 16 |
| /27 | 255.255.255.224 | 30 | 32 |
| /26 | 255.255.255.192 | 62 | 64 |
| /25 | 255.255.255.128 | 126 | 128 |
| /24 | 255.255.255.0 | 254 | 256 |
| /23 | 255.255.254.0 | 510 | 512 |
| /22 | 255.255.252.0 | 1,022 | 1,024 |
| /21 | 255.255.248.0 | 2,046 | 2,048 |
| /20 | 255.255.240.0 | 4,094 | 4,096 |
| /19 | 255.255.224.0 | 8,190 | 8,192 |
| /18 | 255.255.192.0 | 16,382 | 16,384 |
| /17 | 255.255.128.0 | 32,766 | 32,768 |
| /16 | 255.255.0.0 | 65,534 | 65,536 |
| /15 | 255.254.0.0 | 131,070 | 131,072 |
| /14 | 255.252.0.0 | 262,142 | 262,144 |
| /13 | 255.248.0.0 | 524,286 | 524,288 |
| /12 | 255.240.0.0 | 1,048,574 | 1,048,576 |
| /8 | 255.0.0.0 | 16,777,214 | 16,777,216 |
| /4 | 240.0.0.0 | 268,435,454 | 268,435,456 |
| /0 | 0.0.0.0 | 4,294,967,294 | 4,294,967,296 |
How to Use the Subnet Calculator
Subnet Calculation Formulas
Subnet Mask = all 1s for network bits, all 0s for host bits Wildcard Mask = bitwise NOT of subnet mask (255.255.255.255 - mask) Network Addr = IP AND Subnet Mask (bitwise AND) Broadcast Addr = Network Addr OR Wildcard Mask (bitwise OR) First Usable Host = Network Addr + 1 Last Usable Host = Broadcast Addr - 1 Usable Hosts = 2^(32 - prefix) - 2 Total IPs = 2^(32 - prefix) Example: 192.168.1.45/24 Mask: 255.255.255.0 = 11111111.11111111.11111111.00000000 Network: 192.168.1.0 (AND of IP and mask) Broadcast: 192.168.1.255 (network OR wildcard) Wildcard: 0.0.0.255 (bitwise NOT of mask) Hosts: 2^8 - 2 = 254
Note: /31 and /32 subnets are special cases. A /31 has 2 IPs and is used for point-to-point links (RFC 3021) with no traditional network/broadcast. A /32 is a host route representing a single IP address.
Frequently Asked Questions
Related Calculators
Password Generator
Generate secure random passwords with custom length and character sets. Shows entropy and estimated crack time.
Binary Calculator
Convert between binary, decimal, hexadecimal, and octal. Perform binary arithmetic including AND, OR, XOR.
Hex Calculator
Convert between hexadecimal, decimal, binary, and octal. Perform hex arithmetic and bitwise operations.
Roman Numeral Converter
Convert between Arabic and Roman numerals with step-by-step breakdown. Supports 1 to 3999.