Subnet Mask Calculator
Check the network address, broadcast address, available host count, and IP range from an IP address, CIDR prefix, or subnet mask. Everything runs in your browser and nothing is sent to a server.
Input
Sample inputs
Result
Enter a CIDR or subnet mask to see the calculated values.
CIDR and subnet mask reference
A quick table for commonly used CIDR prefixes.
| CIDR | Subnet Mask | Total Addresses | Available 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 | 0 |
| /32 | 255.255.255.255 | 1 | 1 |
/31 is shown as 0 usable hosts in this calculator. Point-to-point links can treat it differently.
How to use
Enter an IP address with a CIDR prefix to see the network range. You can also use CIDR only to check the matching subnet mask, or subnet mask only to find the CIDR prefix.
- 1. Check the network range with IP and CIDREnter 192.168.1.10 and 24 to see the network and broadcast addresses.
- 2. Use subnet mask only to find the CIDREnter 255.255.255.0 to see /24.
- 3. Check edge cases such as /32You can also review /32 and the /31 behavior on the same page.
More details
A shorter guide is available if you want a step-by-step overview of the calculator.
Open the guideFAQ
What is a subnet mask?
A subnet mask shows which part of an IP address is the network portion and which part is the host portion. For example, 255.255.255.0 means the same thing as /24.
What is CIDR?
CIDR is a prefix-length notation such as /24. It is a compact way to describe the size of a network and map it back to a subnet mask.
How many usable hosts are available?
In the usual case, usable hosts are the total addresses minus the network and broadcast addresses. This tool shows /31 as 0 and /32 as 1 for the simple calculation model.
Is my input sent to a server?
No. All calculations happen in the browser, and the IP address or network values you enter are not sent to a server.