Subnet Calculator
Subnet Information
192.168.1.0
192.168.1.255
255.255.255.0
/24
192.168.1.1 - 192.168.1.254
256
254
0.0.0.255
11111111.11111111.11111111.00000000
Class C
Private
Common Subnet Sizes
| CIDR | Subnet Mask | Total IPs | Usable Hosts | Common Use |
|---|---|---|---|---|
| /30 | 255.255.255.252 | 4 | 2 | Point-to-point links |
| /29 | 255.255.255.248 | 8 | 6 | Small office |
| /28 | 255.255.255.240 | 16 | 14 | Small network |
| /27 | 255.255.255.224 | 32 | 30 | Department |
| /26 | 255.255.255.192 | 64 | 62 | Large department |
| /25 | 255.255.255.128 | 128 | 126 | Building floor |
| /24 | 255.255.255.0 | 256 | 254 | Standard LAN |
| /23 | 255.255.254.0 | 512 | 510 | Large LAN |
| /22 | 255.255.252.0 | 1,024 | 1,022 | Campus network |
| /16 | 255.255.0.0 | 65,536 | 65,534 | Large enterprise |
Private IP Address Ranges
Class A Private
10.0.0.0 - 10.255.255.255
CIDR: 10.0.0.0/8 (16,777,216 addresses)
Class B Private
172.16.0.0 - 172.31.255.255
CIDR: 172.16.0.0/12 (1,048,576 addresses)
Class C Private
192.168.0.0 - 192.168.255.255
CIDR: 192.168.0.0/16 (65,536 addresses)
How to Use This Tool
- Enter an IP Address: Input any valid IPv4 address from the network you're planning. The specific host portion doesn't matter—192.168.1.50 and 192.168.1.1 yield identical network calculations for the same subnet mask.
- Select a Subnet Mask: Choose from /8 to /32 using CIDR notation. Common choices: /24 for small networks (254 hosts), /16 for medium networks (65,534 hosts), /30 for point-to-point links (2 hosts).
- Review the Calculations: Examine the network address (first IP), broadcast address (last IP), usable host range, and total host count. The network and broadcast addresses are reserved and cannot be assigned to devices.
- Apply to Your Infrastructure: Use the network address for routing table entries, the broadcast address for network-wide announcements, and assign devices within the usable host range only.
Technical Details
IPv4 subnetting divides the 32-bit address space using a bitmask. The subnet mask determines which bits represent the network portion (fixed) and which represent the host portion (variable). A /24 network uses 24 network bits and 8 host bits, yielding 2^8 = 256 total addresses, with 254 usable after excluding network and broadcast addresses.
CIDR (Classless Inter-Domain Routing) replaced classful networking in 1993, enabling variable-length subnet masks for efficient IP allocation. The formula for usable hosts is (2^n) - 2, where n equals the number of host bits. For point-to-point links, /31 networks (RFC 3021) permit 2 usable addresses by eliminating the broadcast requirement. Network planning should account for growth—a /24 with 200 devices leaves minimal expansion room compared to a /23 with 510 usable addresses.
Common Mistakes to Avoid
- Forgetting Reserved Addresses: The first address (network) and last address (broadcast) are never assignable. A /30 has 4 total addresses but only 2 usable hosts—critical for point-to-point links where every IP counts.
- Overlapping Subnets: When planning multiple subnets, verify ranges don't overlap. 192.168.1.0/24 and 192.168.1.128/25 overlap because the /25 is contained within the /24. Use non-overlapping blocks like 192.168.1.0/25 and 192.168.1.128/25.
- Confusing Subnet Mask Formats: /24 equals 255.255.255.0, not 255.255.255.24. The CIDR number indicates the count of network bits, while dotted-decimal shows which octets are masked. Always verify conversions when configuring network equipment.
Frequently Asked Questions
What is the difference between /24 and 255.255.255.0?
They're identical—just different notations. /24 (CIDR notation) means 24 bits are used for the network portion. 255.255.255.0 (dotted-decimal) represents the same thing as a binary mask. CIDR is shorter and commonly used in routing configurations.
How many usable IP addresses does a /24 network have?
A /24 network has 254 usable host addresses. The total is 256 (2^8), but you subtract 2 for the network address (first) and broadcast address (last), which cannot be assigned to devices.
What subnet should I use for a small office with 50 devices?
A /26 (64 addresses, 62 usable) is technically sufficient but leaves no room for growth. A /25 (128 addresses, 126 usable) provides better headroom. For flexibility, use a /24 (254 usable) unless IP conservation is critical.