Subnet Calculator
Calculate IPv4 subnet details including CIDR, subnet mask, network address, broadcast address, wildcard mask, host range, and usable hosts.
Subnet inputs
Calculate an IPv4 subnet
Enter an IP address with a CIDR prefix, or switch to subnet mask mode and enter a dotted-decimal mask.
You can paste CIDR notation directly, such as 192.168.1.10/24.
Use /0 through /32. Changing CIDR updates the subnet mask.
Valid masks are contiguous, such as 255.255.255.0.
Network address
192.168.1.0
192.168.1.0/24
Broadcast address
192.168.1.255
Last address in this subnet.
Usable host range
192.168.1.1 - 192.168.1.254
First and last usable host addresses.
Usable hosts
254
256 total addresses.
Subnet mask
255.255.255.0
/24 prefix length.
Wildcard mask
0.0.0.255
Inverse of the subnet mask.
Detailed subnet breakdown
A compact table for network planning, firewall notes, and documentation.
| Input IP | 192.168.1.10 |
|---|---|
| CIDR notation | 192.168.1.0/24 |
| Subnet mask | 255.255.255.0 |
| Wildcard mask | 0.0.0.255 |
| Network address | 192.168.1.0 |
| Broadcast address | 192.168.1.255 |
| First usable host | 192.168.1.1 |
| Last usable host | 192.168.1.254 |
| Total addresses | 256 |
| Usable hosts | 254 |
| Network bits | 24 |
| Host bits | 8 |
| IP class | Class C |
| Private/public | Private IPv4 range |
Binary representation
Each octet is padded to 8 bits so the mask boundary is easier to inspect.
IP address
11000000.10101000.00000001.00001010Subnet mask
11111111.11111111.11111111.00000000Network address
11000000.10101000.00000001.00000000Broadcast address
11000000.10101000.00000001.11111111Reference
CIDR quick reference
| CIDR | Subnet mask | Total addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 |
| /32 | 255.255.255.255 | 1 | 1 |
Support
Subnet interpretation
IPv4 subnet formula
The calculator converts the IP and subnet mask to 32-bit numbers, then applies bitwise operations to find the network and broadcast range.
CIDR to mask conversion
A prefix such as /24 means 24 leading mask bits are set to 1, creating 255.255.255.0.
Host range estimate
Ordinary subnets reserve the network and broadcast addresses, so usable hosts are total addresses minus 2.
/31 and /32 edge cases
Point-to-point /31 subnets and single-host /32 routes are shown with their common networking interpretations.
Education
IPv4 subnetting basics
What is a subnet calculator?
It helps turn an IPv4 address and prefix into the subnet details needed for routing, firewall rules, address planning, and documentation.
What is CIDR notation?
CIDR writes the network size after a slash. For example, 192.168.1.10/24 means the first 24 bits identify the network.
How subnet masks work
Mask bits set to 1 keep the network portion. Mask bits set to 0 leave the host portion available for devices.
Network vs broadcast
The network address identifies the subnet. The broadcast address is the final address in a traditional IPv4 subnet.
Usable host range
For /0 through /30, the first usable host is network + 1 and the last usable host is broadcast - 1.
Wildcard mask
The wildcard mask is the inverse of the subnet mask and is useful when writing some routing and access-list rules.
Private vs public ranges
Private IPv4 ranges include 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.
/31 and /32 notes
/31 can be used on point-to-point links. /32 identifies one exact host route.
Limitations
This version supports IPv4 only and does not calculate IPv6, VLSM plans, route aggregation, or multiple subnet splits.
FAQ
Subnet calculator questions
A subnet calculator takes an IPv4 address and CIDR prefix or subnet mask, then calculates the network address, broadcast address, usable host range, and related subnet details.