Subnet Calculator
Calculate network addresses, subnet masks, and IP ranges
Calculator
Quick Select CIDR
Binary Representation
CIDR Reference
| CIDR | Mask | Hosts | Description |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 | Class A default |
| /16 | 255.255.0.0 | 65,534 | Class B default |
| /24 | 255.255.255.0 | 254 | Class C default |
| /25 | 255.255.255.128 | 126 | Half Class C |
| /26 | 255.255.255.192 | 62 | 64 addresses |
| /27 | 255.255.255.224 | 30 | 32 addresses |
| /28 | 255.255.255.240 | 14 | 16 addresses |
| /29 | 255.255.255.248 | 6 | 8 addresses |
| /30 | 255.255.255.252 | 2 | Point-to-point |
| /31 | 255.255.255.254 | 2 | Point-to-point (RFC 3021) |
| /32 | 255.255.255.255 | 1 | Single host |
Subnet Basics
- CIDR: Classless Inter-Domain Routing notation (e.g., /24)
- Network Address: First address in the subnet (identifies the network)
- Broadcast Address: Last address (sends to all hosts in subnet)
- Usable Hosts: Total addresses minus network and broadcast
- Wildcard Mask: Inverse of subnet mask (used in ACLs)
How to Use
Calculate subnet information
Enter IP address
Input an IP address (e.g., 192.168.1.100)
Enter subnet mask
Enter CIDR notation (/24) or subnet mask
View results
See network address, broadcast, and host range
Analyze binary
View binary representation and wildcard mask
Frequently Asked Questions
A subnet mask determines which part of an IP address is the network portion and which is the host portion. Common masks: /24 (255.255.255.0) allows 254 hosts, /16 (255.255.0.0) allows 65,534 hosts.
Hosts = 2^(32-CIDR) - 2. For /24: 2^8 - 2 = 254 usable hosts. We subtract 2 for network address and broadcast address. /25 = 126 hosts, /26 = 62 hosts, /27 = 30 hosts, /28 = 14 hosts.
CIDR (Classless Inter-Domain Routing) notation shows network size as IP/prefix. The prefix is the number of network bits. 192.168.1.0/24 means 24 network bits and 8 host bits (256 addresses, 254 usable).
Network address is the first IP in a subnet (all host bits = 0) and identifies the network. Broadcast address is the last IP (all host bits = 1) and reaches all hosts. Neither can be assigned to devices.
Tech & Dev
Developer tools for JSON, encoding, and regex