Subnet Calculator

192.168.1.0/24 has 254 ordinary host addresses, from 192.168.1.1 through 192.168.1.254; broadcast is 192.168.1.255. A /25 has 126 ordinary hosts and a /26 has 62. The outputs display the network and broadcast in dotted IPv4 notation.

Reserve gateway or infrastructure addresses separately.

Subnet Calculator: inputs

Calculated result
Usable host addresses254
Network address192.168.1.0
Broadcast address192.168.1.255

Subnet Calculator: CIDR prefix length sensitivity

Subnet Calculator: CIDR prefix length and Usable host addresses5 calculations vary the “CIDR prefix length” input while holding the other entered inputs constant.198,190221,022242542662296

Enter the IPv4 address as four octets and the CIDR prefix length, the number after the slash. A /24 prefix means the first 24 bits identify the network and the last 8 identify hosts. The network address is the address with all host bits set to zero, and the broadcast address is the address with all host bits set to one.

The usable host count is 2 raised to the number of host bits, minus 2, because the network and broadcast addresses cannot be assigned to devices.

Subnet: worked example

CIDR prefix length24
IP address, first octet192
IP address, second octet168
IP address, third octet1
IP address, fourth octet0
Usable host addresses254
Network address192.168.1.0
Broadcast address192.168.1.255

Subnet: formula

Network = IP AND subnet mask; broadcast = network OR wildcard mask; usable hosts = 2^(32−prefix) − 2 (RFC 4632 CIDR)

IETF RFC 4632: Classless Inter-domain Routing (CIDR)

A /31 has no broadcast and is used for point-to-point links, and a /32 is a single host, so the minus-2 rule does not apply there. Private ranges such as 192.168.0.0/16 and 10.0.0.0/8 are not routed on the internet. IPv6 uses 128-bit addresses and a different convention.

Real networks also reserve addresses for gateways and infrastructure.

Common error: Applying the minus-two host rule to every prefix. RFC 3021 point-to-point links are a separate address-usage case from ordinary broadcast subnets.

Subnet: changing CIDR prefix length

CIDR prefix lengthUsable host addressesNetwork addressBroadcast address
198,190192.168.0.0192.168.31.255
221,022192.168.0.0192.168.3.255
24 (example)254192.168.1.0192.168.1.255
2662192.168.1.0192.168.1.63
296192.168.1.0192.168.1.7

Subnet: compare input ranges

InputTested fromToUsable host addresses: low inputUsable host addresses: high inputSwing
CIDR prefix length22261,02262960 (378%)
IP address, first octet1732112542540
IP address, second octet1511852542540
IP address, third octet022542540
IP address, fourth octet012542540

Subnet: individual input comparisons

InputValueUsable host addressesNetwork addressBroadcast address
CIDR prefix length198,190192.168.0.0192.168.31.255
221,022192.168.0.0192.168.3.255
24254192.168.1.0192.168.1.255
2662192.168.1.0192.168.1.63
296192.168.1.0192.168.1.7
IP address, first octet154254154.168.1.0154.168.1.255
173254173.168.1.0173.168.1.255
192254192.168.1.0192.168.1.255
211254211.168.1.0211.168.1.255
230254230.168.1.0230.168.1.255
IP address, second octet134254192.134.1.0192.134.1.255
151254192.151.1.0192.151.1.255
168254192.168.1.0192.168.1.255
185254192.185.1.0192.185.1.255
202254192.202.1.0192.202.1.255
IP address, third octet0254192.168.0.0192.168.0.255
0254192.168.0.0192.168.0.255
1254192.168.1.0192.168.1.255
2254192.168.2.0192.168.2.255
3254192.168.3.0192.168.3.255
IP address, fourth octet0254192.168.1.0192.168.1.255
0254192.168.1.0192.168.1.255
0254192.168.1.0192.168.1.255
1254192.168.1.0192.168.1.255
2254192.168.1.0192.168.1.255

Subnet: which assumptions move the result?

Subnet: Usable host addresses as CIDR prefix length changesUsable host addresses starts at 8,190. Moving CIDR prefix length from 19 to 29 changes it to 6, with IP address, first octet 192; IP address, second octet 168; IP address, third octet 1; IP address, fourth octet 0 kept fixed.198,190221,022242542662296
Chart quantityDisplayed settings
CIDR prefix length19 → 29
Usable host addresses8,190 → 6
IP address, first octet192
IP address, second octet168
IP address, third octet1
IP address, fourth octet0

Subnet: values and definitions

Quantity and definitionValue used
CIDR prefix length — The number after the slash, e.g. the 24 in 192.168.1.0/24. 0-32.24
IP address, first octet192
IP address, second octet168
IP address, third octet1
IP address, fourth octet0
Usable host addresses254
Network address192.168.1.0
Broadcast address192.168.1.255

Networking & Technology calculators: Password Entropy Calculator, Download Time Calculator, Storage Converter Calculator, Aspect Ratio Calculator, PPI (Pixels Per Inch) Calculator, Bandwidth and Data Usage Calculator.

A CIDR prefix trades address count for the number of separate networks you can carve out of one block: moving from a /24 to a /26 quarters the usable hosts per subnet but yields four separate subnets instead of one, which matters the moment a network needs to be segmented for security, VLANs or a multi-site design rather than left as one flat range.

Confirm the prefix matches what your router or switch has configured before assuming a device sits inside a given subnet; a device with the right-looking IP address but the wrong mask can silently fail to reach its own gateway.

Estimate the throughput a network needs on the bandwidth calculator, the time a transfer takes on the download time calculator and unit sizes on the storage converter. The password entropy calculator covers account security, and the aspect ratio and PPI pages handle display math for the same tech audience.

Subnet Calculator: quantities and terminology

How many hosts are in a /24 network?

A /24 has 256 addresses, of which 254 are usable after the network and broadcast addresses are set aside.

What does the number after the slash mean?

It is the count of leading bits that identify the network, so a larger number gives a smaller subnet.

Why subtract two from the host count?

The all-zeros host address names the network itself and the all-ones address is the broadcast, so neither can be given to a device.