Home URL tools IP Subnet Calculator

IP Subnet Calculator

Type an IPv4 address and a CIDR prefix to see the subnet mask, network address, broadcast address and the usable host range. This free IP subnet calculator does all the binary math in your browser, so your addresses are never uploaded anywhere.

What is an IP subnet calculator?

An IP subnet calculator takes an IPv4 address and a CIDR prefix and works out every address boundary in that subnet. An IPv4 address is a 32-bit number written as four bytes, or octets, each 0 to 255 — like 192.168.1.10. The CIDR prefix, such as the /24 in 192.168.1.0/24, tells you how many of those 32 bits belong to the network and how many identify a host. The calculator converts the address and prefix into their bit patterns and computes the subnet mask, the reverse wildcard mask, the network address (the first address), the broadcast address (the last address), the usable host range in between, and how many hosts fit overall.

That is the handiest part of subnetting: a /24 gives 254 usable hosts, a /30 gives just two usable hosts on a point-to-point link, and a /27 divides a small network into blocks of 32 addresses. Instead of doing the binary arithmetic in your head, the calculator fills in every value instantly and correctly.

How to use the IP subnet calculator

  1. Type an IPv4 address, such as 192.168.1.10.
  2. Enter a CIDR prefix from 0 to 32, such as 24.
  3. Read the subnet mask, wildcard, network, broadcast and usable host range at once.

Example

Enter 192.168.1.10 with prefix 24 and you get a mask of 255.255.255.0, a wildcard of 0.0.0.255, a network of 192.168.1.0 and a broadcast of 192.168.1.255. The usable range runs from 192.168.1.1 to 192.168.1.254 — 254 hosts in total.

Common use cases

Pro tips

FAQ

What is CIDR notation?

CIDR notation writes an IP address followed by a slash and a prefix, such as 192.168.1.0/24. The prefix is the number of leading bits set in the subnet mask.

How do I find the network address from an IP and prefix?

The network address is the IP address with all host bits set to 0. The calculator masks the address with the prefix so only the network portion remains.

What is the broadcast address for a /24 network?

For a /24 network like 192.168.1.0/24 the broadcast address is 192.168.1.255, where every host bit is set to 1.

How many usable hosts are in a /24 subnet?

A /24 subnet has 256 addresses in total, so it holds 254 usable hosts after subtracting the network address and the broadcast address.

Why do I subtract two hosts?

The very first address is the network address and the very last is the broadcast address, so neither can be assigned to a normal device. That leaves the addresses in between as usable hosts.

What is a subnet mask?

A subnet mask is a 32-bit number that separates an IPv4 address into its network and host portions, such as 255.255.255.0 for a /24 prefix.

What is the wildcard mask?

The wildcard mask is the inverse of the subnet mask, used by access control lists and routing protocols. For 255.255.255.0 the wildcard is 0.0.0.255.

How many hosts does a /30 subnet hold?

A /30 subnet has four addresses, giving two usable hosts. It is commonly used for a point-to-point link between two routers.

What is the difference between a /31 and a /32?

A /31 subnet has two addresses and both are usable on a point-to-point link. A /32 is a single host address with no network or broadcast separation.

Is the IP subnet calculator private?

Yes. All the math runs in your browser and the address you enter is never uploaded, stored or sent anywhere.

Related tools

Related searches

ip subnet calculator, subnet calculator, cidr calculator, subnet mask calculator, ip range calculator, usable hosts, network address, broadcast address, ipv4 subnet, cidr to mask