IP Subnet Calculator
Calculate IP subnets, network ranges, and CIDR notation. Find network address, broadcast address, usable hosts, and subnet mask for any IP.
Subnet Info
Network Address
192.168.1.0
IP Address
Common Subnet Sizes
Subnet Details
IP Classification
IP Class
Class C
IP Type
Private (192.168.0.0/16)
Binary Representation
IP Address:
11000000.10101000.00000001.01100100
Subnet Mask:
11111111.11111111.11111111.00000000
Network/Host Split:
11111111111111111111111100000000(24 network bits, 8 host bits)
Subnet Reference Table
| CIDR | Subnet Mask | Usable Hosts | Notes |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 | Class A |
| /16 | 255.255.0.0 | 65,534 | Class B |
| /24 | 255.255.255.0 | 254 | Class C |
| /25 | 255.255.255.128 | 126 | /25 |
| /26 | 255.255.255.192 | 62 | /26 |
| /27 | 255.255.255.224 | 30 | /27 |
| /28 | 255.255.255.240 | 14 | /28 |
| /29 | 255.255.255.248 | 6 | /29 |
| /30 | 255.255.255.252 | 2 | /30 (P2P) |
| /31 | 255.255.255.254 | 2 | /31 (P2P) |
| /32 | 255.255.255.255 | 1 | /32 (Host) |
Private IP Ranges (RFC 1918)
Class A Private
10.0.0.0/8
10.0.0.0 - 10.255.255.255
16.7M addresses
Class B Private
172.16.0.0/12
172.16.0.0 - 172.31.255.255
1M addresses
Class C Private
192.168.0.0/16
192.168.0.0 - 192.168.255.255
65K addresses
Quick Answer
To calculate a subnet: determine how many hosts you need, find the smallest subnet that fits, apply the subnet mask. CIDR /24 = 254 usable hosts, subnet mask 255.255.255.0. /25 = 126 hosts, /26 = 62 hosts, /27 = 30 hosts. Formula: Usable hosts = 2^(32-CIDR) - 2. The -2 accounts for network and broadcast addresses.
Key Facts
- CIDR notation: /24 means 24 network bits, 8 host bits
- Usable hosts = 2^(host bits) - 2 (minus network and broadcast)
- /24 = 255.255.255.0 = 254 hosts
- /25 = 255.255.255.128 = 126 hosts
- /26 = 255.255.255.192 = 62 hosts
- /27 = 255.255.255.224 = 30 hosts
- /28 = 255.255.255.240 = 14 hosts
- IPv4: 32 bits total. IPv6: 128 bits total
Frequently Asked Questions
A subnet mask is a 32-bit number that divides an IP address into network and host portions. It determines which part of the IP identifies the network and which identifies the device. Common masks: /24 (255.255.255.0) for 254 hosts, /16 (255.255.0.0) for 65,534 hosts.
CIDR (Classless Inter-Domain Routing) notation expresses the subnet mask as a slash followed by the number of network bits. For example, /24 means 24 bits for network, 8 bits for hosts. 192.168.1.0/24 covers 192.168.1.0 to 192.168.1.255.
The network address is the first IP in a subnet (all host bits = 0) and identifies the network. The broadcast address is the last IP (all host bits = 1) and is used to send data to all hosts on the subnet. Neither can be assigned to devices.
Private IP ranges are reserved for internal networks and not routable on the internet: 10.0.0.0/8 (Class A), 172.16.0.0/12 (Class B), 192.168.0.0/16 (Class C). These allow multiple organizations to use the same addresses internally.
Usable hosts = 2^(host bits) - 2. Subtract 2 because the network address and broadcast address cannot be assigned to devices. For /24: 2^8 - 2 = 254 usable hosts. For /30: 2^2 - 2 = 2 usable hosts (often used for point-to-point links).
A wildcard mask is the inverse of a subnet mask, used in access control lists (ACLs) and routing protocols. Where subnet mask has 1s, wildcard has 0s, and vice versa. For /24: subnet mask is 255.255.255.0, wildcard is 0.0.0.255.
Subnet Info
Network Address
192.168.1.0