
Subnet Calculator
Calculate subnet details from an IP address and CIDR prefix or subnet mask
Subnet Details
| Network Address | 192.168.1.0 |
| Broadcast Address | 192.168.1.255 |
| Subnet Mask | 255.255.255.0 |
| Wildcard Mask | 0.0.0.255 |
| CIDR Notation | /24 |
| First Usable Host | 192.168.1.1 |
| Last Usable Host | 192.168.1.254 |
| Total Addresses | 256 |
| Usable Hosts | 254 |
| IP Class | Class C |
| Address Type | Private (RFC 1918) |
Binary Representation
| Network | 11000000.10101000.00000001.00000000 |
| Subnet Mask | 11111111.11111111.11111111.00000000 |
| Broadcast | 11000000.10101000.00000001.11111111 |
Address Range Visualization
CIDR Quick Reference
| CIDR | Subnet Mask | Usable Hosts |
|---|---|---|
| /32 | 255.255.255.255 | 1 |
| /31 | 255.255.255.254 | 2 |
| /30 | 255.255.255.252 | 2 |
| /29 | 255.255.255.248 | 6 |
| /28 | 255.255.255.240 | 14 |
| /27 | 255.255.255.224 | 30 |
| /26 | 255.255.255.192 | 62 |
| /25 | 255.255.255.128 | 126 |
| /24 | 255.255.255.0 | 254 |
| /23 | 255.255.254.0 | 510 |
| /22 | 255.255.252.0 | 1,022 |
| /21 | 255.255.248.0 | 2,046 |
| /20 | 255.255.240.0 | 4,094 |
| /16 | 255.255.0.0 | 65,534 |
| /12 | 255.240.0.0 | 1,048,574 |
| /8 | 255.0.0.0 | 16,777,214 |
| /0 | 0.0.0.0 | 4,294,967,294 |
Understanding Subnetting
Subnetting is the practice of dividing a network into smaller, more manageable sub-networks (subnets). It is a fundamental skill for network engineers, system administrators, and anyone working with IP networks. Subnetting allows you to efficiently allocate IP addresses, improve network security through segmentation, and reduce broadcast traffic.
Every IPv4 address consists of 32 bits, divided into a network portion and a host portion. The subnet mask determines where this division occurs. Bits set to 1 in the subnet mask identify the network portion, while bits set to 0 identify the host portion.
CIDR Notation
CIDR (Classless Inter-Domain Routing) notation is the modern way to express subnet masks. Instead of writing out the full mask (e.g., 255.255.255.0), CIDR uses a slash followed by the number of network bits (e.g., /24). A /24 network has 24 bits for the network portion and 8 bits for hosts, giving 256 total addresses (254 usable).
Key Subnet Concepts
| Term | Description |
|---|---|
| Network Address | The first address in a subnet; identifies the network itself. Cannot be assigned to a host. |
| Broadcast Address | The last address in a subnet; used to send data to all hosts in the network. |
| Subnet Mask | A 32-bit number that separates the network and host portions of an IP address. |
| Wildcard Mask | The inverse of the subnet mask. Used in ACLs and OSPF configurations (Cisco). |
| Usable Hosts | Total addresses minus 2 (network and broadcast). For /31, both addresses are usable (RFC 3021). |
| CIDR Prefix | The number of leading 1-bits in the subnet mask, written as /N (e.g., /24). |
Private IP Address Ranges (RFC 1918)
Three address ranges are reserved for private networks and are not routable on the public internet. These are the addresses used inside homes, offices, and data centers behind NAT (Network Address Translation).
| Range | CIDR | Addresses |
|---|---|---|
| 10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | 16,777,216 |
| 172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | 1,048,576 |
| 192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | 65,536 |
Subnetting Example
Suppose you have the network 192.168.1.0/24 and need to create 4 equal subnets. You would borrow 2 bits from the host portion (2^2 = 4 subnets), changing the prefix from /24 to /26. Each /26 subnet has 64 total addresses (62 usable):
| Subnet | Range | Broadcast |
|---|---|---|
| 192.168.1.0/26 | 192.168.1.1 – .62 | 192.168.1.63 |
| 192.168.1.64/26 | 192.168.1.65 – .126 | 192.168.1.127 |
| 192.168.1.128/26 | 192.168.1.129 – .190 | 192.168.1.191 |
| 192.168.1.192/26 | 192.168.1.193 – .254 | 192.168.1.255 |