>_toolkitbox

~/tools / Subnet Calculator

Subnet Calculator

Compute CIDR notation, network address, and usable host range from an IP address and subnet mask (e.g. 255.255.255.0).

Router and server config screens often ask for a dotted-decimal subnet mask like "255.255.255.0" — this converts that into CIDR notation (/24, etc.) and the actual host range.

# Use Cases

  • Converting a subnet mask shown in a router or OS network settings screen into CIDR notation (/24, etc.)
  • Checking the actual range of usable host addresses on a given subnet
  • Making sense of a dotted-decimal mask found in an on-prem device's manual

# Usage

  1. Enter an IP address and subnet mask into their respective fields.
  2. CIDR notation, network address, and usable host range are calculated automatically as you type.
  3. An error message appears if the subnet mask is invalid.
CIDR notation
192.168.1.0/24
Network address
192.168.1.0
Broadcast address
192.168.1.255
First usable host
192.168.1.1
Last usable host
192.168.1.254
Usable hosts
254

# FAQ

How is this different from the CIDR Calculator?
The CIDR Calculator takes prefix notation like "/24", while this tool takes a dotted-decimal subnet mask like "255.255.255.0". Both produce the same result.
What makes a subnet mask invalid?
A subnet mask must be a run of 1 bits followed by a run of 0 bits in binary (e.g. 255.255.254.0 is valid, but 255.255.253.0 is not).

# Related