Subnet Calculator
Enter an IPv4 address and a CIDR prefix to get the network address, broadcast address, subnet mask, wildcard mask, and the usable host range for that subnet.
Network address
192.168.1.0
/24 · 255.255.255.0
Broadcast
192.168.1.255
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Usable hosts
254
First usable
192.168.1.1
Last usable
192.168.1.254
Who should use it: Network engineers, IT technicians, and students planning or troubleshooting IPv4 subnets.
How to use this calculator
- 1Enter an IPv4 address (e.g. 192.168.1.10).
- 2Select a CIDR prefix from /0 to /32.
- 3Review the network, broadcast, subnet mask, wildcard mask, and usable host range.
Understanding the inputs
| IP address | A valid IPv4 address in dotted-decimal form, such as 192.168.1.10. Each octet must be 0–255. |
| CIDR prefix | The prefix length from /0 to /32, which sets how many bits are the network portion of the address. |
How the calculation works
The calculator converts the IPv4 address to a 32-bit integer, applies the subnet mask derived from the CIDR prefix, and computes the network address (IP AND mask), broadcast address (network OR wildcard), subnet mask, and wildcard mask. The usable host range excludes the network and broadcast addresses for prefixes below /31, while /31 and /32 follow the special-case rules for point-to-point and single-host networks.
Worked example
Scenario: IP 192.168.1.10 with a /24 prefix.
Result: Network = 192.168.1.0; broadcast = 192.168.1.255; subnet mask = 255.255.255.0; wildcard = 0.0.0.255; usable hosts = 254 (192.168.1.1 – 192.168.1.254).
How to interpret your result
The network address is the start of the subnet, the broadcast address is the end, and the usable host range is the addresses you can assign to devices in between. The subnet mask shows the network bits, and the wildcard mask is its bitwise inverse. The usable host count tells you how many devices the subnet can address.
Factors that can affect the result
- CIDR prefix: a smaller prefix (e.g. /16) creates a larger subnet with more hosts; a larger prefix (e.g. /30) creates a smaller one.
- Special cases: /31 and /32 follow point-to-point and single-host rules and do not subtract two hosts the usual way.
- Input validity: each octet must be 0–255, or no result is shown.
Limitations and assumptions
- Supports IPv4 only; it does not handle IPv6 addresses.
- Performs subnet math only; it does not scan networks, configure devices, or provide security analysis.
- Does not account for routing, VLANs, or real network topology.
- Does not validate that the address belongs to a reserved or private range beyond the octet range check.
Frequently asked questions
Related calculators
Methodology
The calculator converts the IPv4 address to a 32-bit integer, derives the subnet mask from the CIDR prefix, and computes the network, broadcast, wildcard, and usable host range using bitwise operations, with special-case handling for /31 and /32.
Sources and references
- RFC 3021 — Using 31-Bit Prefixes on IPv4 Point-to-Point Links — special-case handling for /31 point-to-point networks
Disclaimer: Results are provided for informational purposes and may vary depending on the values entered, the assumptions described above, and rounding. They are not a substitute for professional advice specific to your situation. Read the full disclaimer.