IPv4 subnet calculator

Find the network, address range, and usable hosts.

For example, 192.168.1.20.

Enter an IPv4 address and choose its prefix.

Preparing your result.

Tell us what happened and what you expected. Please leave out personal information and private tool inputs.

These details describe your setup. They don’t include your name, email, or anything entered into the tool.

See the details included

Voting-limit status from this browser is included. Reports are stored by Netlify so I can investigate.

Separate the network bits from the host bits

An IPv4 address has 32 bits. The prefix says how many belong to the network. The remaining 32 minus prefix bits create 2^(32 − prefix) addresses. The subnet mask has ones for network bits and zeros for host bits; the wildcard mask reverses those bits.

For 192.168.1.20/24, the network is 192.168.1.0, the mask is 255.255.255.0, and the broadcast is 192.168.1.255. The conventional host range runs from 192.168.1.1 to 192.168.1.254, giving 254 hosts. RFC 4632 describes CIDR addressing.

The smallest address blocks need different rules

A /31 has two addresses and can use both on a point-to-point link under RFC 3021. A /32 identifies one address. Neither receives a separate broadcast address in this result.

Larger blocks can contain reserved or otherwise unsuitable addresses. The arithmetic does not check allocation registries, routing policies, or your organization’s network plan.

FAQs

What does /24 mean?

It means the first 24 of the address’s 32 bits identify the network. The remaining eight bits provide 256 addresses. A conventional /24 excludes the network and broadcast addresses, leaving 254 hosts.

Why does /31 show two usable addresses?

RFC 3021 allows both addresses of a /31 on a point-to-point link. It has no separate broadcast address in that use. Check that the devices and network support this arrangement.

Does the usable range show which addresses are free?

No. It describes the address range mathematically. The tool does not contact hosts, inspect interfaces, or check assignments, so it cannot tell you which addresses are available.

Have an idea for a tool I should add? Send it in. I read every suggestion and choose which ones to build next.

For example: "Count the weekdays until a date, without holidays."

Please don't include your name, email, or anything personal. I don't need it. Voting-limit status from this browser is included.