Home Work & Income IP Subnet Calculator

IP Subnet Calculator

Network address, broadcast address, subnet mask and usable host range for any IPv4 address and prefix length.

Advertisement

How it works

An IPv4 address is 32 bits. The prefix length says how many leading bits name the network; the rest name hosts inside it. Setting the host bits to zero gives the network address, setting them to ones gives the broadcast address, and the addresses between them (excluding those two) are usable by devices. The mask is the prefix written as four octets.

Advertisement

Formula

Subnet size = 2^(32 − prefix) addresses.
Network = address with host bits cleared.
Broadcast = network + size − 1.
Usable hosts = size − 2 (all but network and broadcast).

Example

Example in plain words. 192.168.1.10 with prefix /24.

Size: 2^(32 − 24) = 256 addresses.

Network: 192.168.1.0, broadcast: 192.168.1.255, mask: 255.255.255.0.

Usable: 254 hosts, from 192.168.1.1 to 192.168.1.254.

Frequently asked questions

What are /31 and /32?

A /32 names one single address. A /31 has just two addresses and is used for point-to-point links, where the broadcast reservation does not apply; the calculator shows the full size for these.

Is my address private?

Ranges 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are private and never routed on the public internet.

Advertisement

Related calculators

Salary Calculator

Convert a salary between hourly, weekly, every two weeks, monthly and yearly pay.

Time Card Calculator

Add up your clock-in and clock-out times for the week, take off breaks, and get total hours and pay.

Prorated Salary Calculator

Pay for part of a month, for example when you start or leave in the middle of it.

Bandwidth Calculator

How long a download takes from the file size and your connection speed, in seconds, minutes and hours.