IT infrastructure calculators

IPv4 Subnet Calculator

Enter an IPv4 address and CIDR prefix to find its network, mask, wildcard mask, broadcast address and usable host range. /31 and /32 use point-to-point and single-host rules.

Result

Network192.168.1.0/24
Netmask255.255.255.0
Wildcard0.0.0.255
Broadcast192.168.1.255
First host192.168.1.1
Last host192.168.1.254
Usable hosts254

Note: /31 and /32 are shown without subtracting network and broadcast addresses: a /31 is a two-address point-to-point link (RFC 3021) and a /32 is a single host. You can also paste an address with its prefix, like 10.0.0.1/8.

Learn more

How it works

An IPv4 address is 32 bits. The CIDR prefix says how many of those bits name the network; the rest number the hosts inside it. A /24 keeps 24 network bits and leaves 8 for hosts, so the network holds 28 = 256 addresses.

The calculator clears the host bits to find the network address and sets them all to 1 to find the broadcast address. Every address in between is a usable host, which is why usable hosts are 2host bits - 2. The wildcard is the mask with every bit flipped, the form Cisco ACLs and OSPF use.

Two sizes follow different rules: a /31 has two usable addresses for a point-to-point link (RFC 3021), and a /32 is a single host.

Worked example

Take 192.168.1.10/26. A /26 leaves 6 host bits, so each block is 64 addresses and blocks start at .0, .64, .128 and .192. The address .10 falls in the first block:

Network192.168.1.0/26
Netmask255.255.255.192
Broadcast192.168.1.63
Host range192.168.1.1 - 192.168.1.62
Usable hosts64 - 2 = 62
What is the difference between /24 and 255.255.255.0?

Nothing. They are two ways to write the same mask: 24 one-bits followed by 8 zero-bits.

How do I pick a prefix for a number of hosts?

Find the smallest power of two that is at least hosts + 2. For 50 hosts that is 64, a /26. If you need several subnets of different sizes from one block, use the VLSM Planner.

Why does the calculator reject 192.168.010.5?

Some systems read a leading zero as octal, so 010 can mean 8 instead of 10. To avoid a silent wrong answer, octets with leading zeros are refused.

Can I paste an address with the prefix?

Yes. Enter something like 10.20.30.40/20 in the address box and the calculator uses the pasted /20 instead of the prefix field, which keeps its old value. A note under the fields shows which prefix is in use.

Maintained by the RACKCRUNCH team. Last reviewed September 29, 2026. How we calculate | Report a problem