Check my IP

Home / Subnet Calculator

Subnet Calculator

Work out network ranges, masks and usable hosts for any IPv4 or IPv6 CIDR block.

About Subnet Calculator

A subnet calculator turns a CIDR block into the numbers you need to configure a network: the network and broadcast addresses, the first and last usable host, the subnet and wildcard masks, and how many hosts fit. It supports both IPv4 and IPv6, and runs entirely in your browser, so nothing you type leaves your device.

Frequently asked questions

Is this a CIDR calculator?

Yes. Enter any IPv4 or IPv6 address with a prefix length, such as 10.0.0.0/20, and it returns the network address, broadcast address, subnet mask, wildcard mask, first and last usable host and the number of hosts. It works as a subnet mask calculator and an IP range calculator too.

How do I calculate a subnet mask?

Write the prefix length as that many 1 bits followed by 0 bits to fill 32, then convert each group of 8 bits to decimal. For /26 that is 11111111.11111111.11111111.11000000, which is 255.255.255.192. This calculator does it for you and also gives the host range.

How many hosts are in a /24 network?

A /24 network has 256 addresses, of which 254 are usable for devices. One address is the network ID and one is the broadcast address. The subnet mask is 255.255.255.0.

What does CIDR notation mean?

CIDR notation writes a network as an address followed by a slash and a number, such as 192.168.1.0/24. The number is how many leading bits identify the network, and the remaining bits identify hosts. A bigger number means a smaller network.

Related guides

More tools