/tools/kalkulator-subnet
Subnet Calculator
Enter an IP address in CIDR notation and you get the network address, broadcast address, subnet mask, usable host count, and the binary form straight away. Everything is computed in your browser, nothing is sent to a server.
Example: 192.168.1.0/24
The prefix lengths you will actually use
Memorize this table. Most subnetting questions in exams and interviews land on one of these rows.
| CIDR | Subnet Mask | Hosts | When to use it |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 | Enormous network, rarely used in a lab |
| /16 | 255.255.0.0 | 65,534 | Campus or branch office network |
| /20 | 255.255.240.0 | 4,094 | A split you commonly see in corporate environments |
| /22 | 255.255.252.0 | 1,022 | One physical network split into four VLANs |
| /24 | 255.255.255.0 | 254 | The most common one in home and lab networks |
| /26 | 255.255.255.192 | 62 | A subnet per device in a small lab |
| /30 | 255.255.255.252 | 2 | Exactly one link between two routers |
Why /24 gives you 254 hosts, not 256
A /24 prefix locks the first 24 bits as the network identity and leaves 8 bits for hosts. That is 256 combinations, but two are spoken for: the network address as the identity and the broadcast address for last-device announcements. That leaves 254 for real devices.
This rule is what makes subnetting feel fiddly, and it is where most arithmetic mistakes come from. The manual method is covered in Subnetting Manually Without a Calculator.
Use this to check your work, not to avoid it
This is most useful as a second opinion. Do it by hand first, then type your answer in here. When they disagree you now know which step went wrong. To actually understand subnetting from scratch, work through the Networking from Scratch series.