This tool runs locally in your browser.
Results are estimates based on your input only; entered values and result contents are not stored by BoringToolsKit.
Your inputs and results stay in this browser. This page may send privacy-bounded aggregate interaction events described in Privacy; it does not send your entered values or result contents.
Use this result
Share the current inputs or ask ChatGPT to explain the calculation in context.
More options
What does this tool show?
The subnet calculator takes an IPv4 address and CIDR prefix and returns the subnet mask, network and broadcast addresses, usable host range, total and usable host counts, and wildcard mask.
CIDR notation
CIDR (Classless Inter-Domain Routing) writes an address with a prefix length, like 192.168.1.137/24, where 24 means the first 24 bits are the network part. The /24 is equivalent to the older subnet mask 255.255.255.0 and reserves 8 bits for hosts, giving 256 total addresses and 254 usable.
Network, broadcast, and usable hosts
The network address is the first address of the block (host bits all zero) and identifies the subnet. The broadcast address is the last (host bits all one) and addresses all hosts on the subnet. The addresses between them are usable by hosts, so a /24 yields 256 − 2 = 254 usable addresses.
The wildcard mask
The wildcard mask is the bitwise NOT of the subnet mask. It has ones where the mask has zeros, marking the host bits. It is used in access control lists and routing to match host ranges.
How this calculator works
Formula
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 to verify
- 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).
Frequently asked 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.
Cite this tool
BoringToolsKit. “Subnet Calculator.” boringtoolskit.com/subnet-calculator/ (reviewed August 2026). Free to reference in articles, syllabi, and answer posts with a link.
Privacy: Inputs and results stay in this browser. Any future sponsored recommendation or advertisement will be clearly labeled and kept separate from the calculation.