Subnet Calculator guide
Subnet Calculator: Network, Broadcast and Host Range for IPv4
Use our IPv4 subnet calculator to find the network and broadcast address, usable host range, subnet mask and wildcard mask for any IP address and CIDR prefix.
By the AllCalculator editorial teamUpdated 15 October 20261 min read
Subnetting splits a network into smaller pieces. Getting the boundaries right by hand means working in binary, which is easy to get wrong. Our Subnet Calculator does it instantly for any IPv4 address.
How to use the calculator (Subnet Calculator)
- Enter an IP address, such as 192.168.1.130. You can add the prefix too, as in 192.168.1.130/26.
- Otherwise, enter the prefix length (CIDR) separately.
You'll see the network address, broadcast address, first and last usable hosts, subnet mask, wildcard mask, number of hosts, address class and whether it's private.
How subnetting works
An IPv4 address is 32 bits. The prefix length says how many of those bits identify the network; the rest identify hosts. A /26 leaves 32 − 26 = 6 host bits, so the subnet has 2⁶ = 64 addresses. Two are reserved, the network and broadcast addresses, leaving 62 usable hosts.
A worked example
With the calculator's default settings, 192.168.1.130/26:
- Subnet mask: 255.255.255.192
- Network address: 192.168.1.128
- Broadcast address: 192.168.1.191
- Usable hosts: 192.168.1.129 to 192.168.1.190
Common prefixes
| Prefix | Subnet mask | Usable hosts |
|---|---|---|
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /30 | 255.255.255.252 | 2 |
Private address ranges
These ranges are reserved for private networks and aren't routed on the internet:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
For converting addresses to binary, try our Binary Calculator.
Frequently asked questions
What's a wildcard mask?
The inverse of the subnet mask, used in access control lists on routers. For 255.255.255.192, it's 0.0.0.63.
Why are two addresses unusable?
The first is the network address and the last is the broadcast address. /31 and /32 are exceptions, used for point-to-point links and single hosts.
Does it support IPv6?
Not yet. It works with IPv4 addresses.
Subnetting is a core networking skill. Use the Subnet Calculator to check your plans and revise for exams.
Sources and further reading
- IETF RFC 4632: Classless Inter-domain Routing (CIDR)rfc-editor.org
- IETF RFC 1918: Address Allocation for Private Internetsrfc-editor.org
Links open official and independent websites in a new tab.
This guide is general information to help you understand your options. It isn't financial, tax, legal or building advice and doesn't take your personal circumstances into account. Figures were checked when the guide was last updated and can change, so confirm anything important with GOV.UK, HMRC, a regulated adviser or a qualified tradesperson.