# Subnet Calculator

> Subnet calculator: convert an IPv4 address and CIDR mask into network, broadcast, wildcard, and usable host ranges instantly. Free, runs in your browser.

- **Canonical URL:** https://boringtoolskit.com/subnet-calculator/
- **Category:** Text & Developer Tools
- **Evidence level:** authored-methodology
- **Reviewed:** August 2026
- **Last verified:** 2026-10-12
- **Privacy:** Inputs and results stay in this browser unless the page clearly labels an external request.

## How it works

The subnet mask for prefix p is the top p bits set: mask = 0xFFFFFFFF << (32 − p). Network = IP AND mask. Broadcast = network OR NOT mask. Usable hosts = 2^(32−p) − 2 (minus network and broadcast). Wildcard mask = NOT mask.

## Worked example

For 192.168.1.137/24, the subnet mask is 255.255.255.0, the network address is 192.168.1.0, the broadcast is 192.168.1.255, and there are 254 usable host addresses (192.168.1.1–192.168.1.254).

## Assumptions

- The input is a valid IPv4 address and a CIDR prefix between 0 and 32.
- Network and broadcast addresses are not counted as usable hosts (for prefixes below 31).
- Private ranges follow RFC 1918 (10/8, 172.16/12, 192.168/16).

## Common questions

### What is a subnet calculator?

It takes an IPv4 address and a CIDR prefix and returns the network address, broadcast address, usable host range, subnet mask, and other details of that subnet.

### How many usable hosts are in a /24?

A /24 has 2^(32−24) = 256 total addresses. Subtracting the network and broadcast addresses leaves 254 usable host addresses.

### What is the difference between a subnet mask and CIDR?

They express the same thing in different ways: the CIDR prefix /24 equals the subnet mask 255.255.255.0. Both say the first 24 bits identify the network.

### How do I find the network and broadcast addresses?

The network address is the IP with the host bits set to zero (IP AND mask); the broadcast is the host bits set to one (network OR NOT mask). For 192.168.1.137/24 that is 192.168.1.0 and 192.168.1.255.

### What is the wildcard mask?

It is the bitwise NOT of the subnet mask, with ones marking host bits. For 255.255.255.0 the wildcard is 0.0.0.255. It is used in access lists to match address ranges.

## Related tools

- /subnet-calculator/
- /hex-to-decimal/
- /base64-tool/

## Sources

- [IP Addressing and Subnetting](https://www.cisco.com/c/en/us/support/docs/ip/routing-information-protocol-rip/13788-3.html)
- [IPv4 Address Space Registry](https://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.xhtml)

---

*Local planning estimate. Verify current terms, rates, and policies before acting.*

