Home Work & Income IP Subnet Calculator (CIDR)

IP Subnet Calculator (CIDR)

Network address, subnet mask, host range and broadcast for any IPv4 CIDR block.

Advertisement

How it works

Enter any IPv4 address and a prefix length. The prefix says how many of the 32 bits identify the network; the rest identify hosts. The calculator masks the address down to the network (Subnet) base, derives the mask and broadcast, and counts the usable hosts. Written as CIDR (CIDR), 192.168.1.10 with prefix 24 is 192.168.1.10/24.

Advertisement

Formula

Network = address AND mask, where the mask is the prefix length in one-bits.
Broadcast = network OR the inverted mask.
Usable hosts = block size - 2 for blocks larger than 2.

Example

Example in plain words. 192.168.1.10 with prefix 24.

Network 192.168.1.0, mask 255.255.255.0.

Hosts run 192.168.1.1 to 192.168.1.254: 254 usable, with 192.168.1.255 as broadcast.

Frequently asked questions

Why subtract 2 from the host count?

The network address names the block itself and the broadcast address talks to everyone on it. Neither can be given to a device, so a /24 has 254 usable hosts, not 256.

What about /31 and /32?

A /32 is one address (a single host route); a /31 is a point-to-point link where both addresses are usable by convention. The calculator shows both addresses in those cases.

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.

IP Subnet Calculator

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