Advertisement placeholder
Subnet Calculator
Enter an IP address and CIDR prefix or subnet mask to calculate the network address, broadcast address, host range, and more.
Input
Results
| Network Address | — |
| Broadcast Address | — |
| Subnet Mask | — |
| Wildcard Mask | — |
| First Usable Host | — |
| Last Usable Host | — |
| Total Addresses | — |
| Usable Hosts | — |
| IP Class | — |
| CIDR Notation | — |
How Subnet Calculation Works
A subnet mask divides an IP address into two parts: the network portion (identifying the subnet) and the host portion (identifying individual devices). The CIDR prefix length tells you how many bits are used for the network portion.
Key Concepts
- Network Address — The first address in the subnet, identifies the network itself. Found by ANDing the IP with the subnet mask.
- Broadcast Address — The last address in the subnet, used to send data to all hosts. Found by ORing the IP with the wildcard mask.
- Subnet Mask — A 32-bit number where network bits are 1 and host bits are 0 (e.g. 255.255.255.0 for /24).
- Wildcard Mask — The inverse of the subnet mask, used in access control lists. (e.g. 0.0.0.255 for /24).
- Usable Hosts — Total addresses minus 2 (network and broadcast addresses), except for /31 and /32 networks.
Common Subnet Sizes
- /24 — 256 addresses, 254 usable hosts (most common LAN)
- /16 — 65,536 addresses, 65,534 usable hosts
- /8 — 16,777,216 addresses (Class A network)
- /30 — 4 addresses, 2 usable hosts (point-to-point links)
- /32 — 1 address (single host route)