Subnet Calculator

Plan IPv4 networks fast. This free subnet calculator turns an IP and CIDR prefix into the network and broadcast addresses, subnet mask, wildcard, usable host range and host count.

IPv4 address
/

Enter an IPv4 address and a CIDR prefix (0–32). The calculator works out the network and broadcast addresses, subnet mask, usable host range and host count.

Usable hosts
Enter an IP and prefix
Network address
Broadcast address
Usable host range
Subnet mask
Wildcard mask
Total addresses
CIDR

For IPv4 networks. Usable hosts exclude the network and broadcast addresses (for /31 and /32, special rules apply). All figures are calculated locally in your browser.

Use this free subnet calculator to work out an IPv4 network from an IP address and CIDR prefix. Get the network and broadcast addresses, subnet mask, usable host range and host count.

What this subnet calculator shows you

subnet calculator takes an IPv4 address and prefix (like 192.168.1.10/24) and returns the network address, broadcast address, subnet mask, wildcard mask, usable host range and number of hosts — everything you need to plan or document a network.

How subnetting works

Network = IP AND mask
Broadcast = network OR wildcard
Usable hosts = 2^(32 − prefix) − 2

For 192.168.1.10/24: the network is 192.168.1.0, the broadcast is 192.168.1.255, the mask is 255.255.255.0, and there are 254 usable hosts (192.168.1.1 to 192.168.1.254).

Common CIDR prefixes

CIDR Mask Usable hosts
/24 255.255.255.0 254
/26 255.255.255.192 62
/28 255.255.255.240 14
/30 255.255.255.252 2

Why subtract 2 hosts?

In a normal subnet, the first address is the network ID and the last is the broadcast address, so neither can be assigned to a device. The /31 prefix is a special point-to-point case (two usable addresses), and /32 represents a single host.

How to use the subnet calculator

  1. Enter an IPv4 address (e.g. 10.0.0.5).
  2. Enter the CIDR prefix (0–32).
  3. Read the network details and usable host range.

Subnet Calculator FAQ

How do I calculate a subnet?

Apply the subnet mask to the IP: the network address is IP AND mask, the broadcast is network OR wildcard, and usable hosts are 2^(32−prefix) − 2. This calculator does it for you.

How many hosts are in a /24?

A /24 has 256 total addresses and 254 usable hosts, because the network and broadcast addresses can't be assigned to devices.

What is a CIDR prefix?

The number after the slash (like /24) tells you how many bits are fixed for the network. A larger prefix means a smaller subnet with fewer hosts.

What's the difference between subnet and wildcard mask?

The subnet mask marks the network bits (e.g. 255.255.255.0); the wildcard mask is its inverse (0.0.0.255) and is used in tools like ACLs.

Why do /31 and /32 behave differently?

A /31 is a special point-to-point link with two usable addresses (RFC 3021), and a /32 represents a single host, so the usual "subtract 2" rule doesn't apply.

Is the subnet calculator free?

Yes, this subnet calculator is completely free, needs no sign-up, and runs entirely in your browser.

Related Calculators