Home/Subnet Calculator

IPv4 subnet calculator

Enter an IPv4 address and prefix (CIDR) to instantly calculate the network address, broadcast, usable host range, subnet mask, wildcard and host count.

CIDR notation
Loading…
Subnet mask
Loading…
Wildcard mask
Loading…
Network address
Loading…
Broadcast address
Loading…
First usable host
Loading…
Last usable host
Loading…
Total addresses
Loading…
Usable hosts
Loading…
IP class
Loading…
Address type
Loading…
Mask in binary
Loading…

What is a subnet?

A subnet splits a large IP network into smaller, manageable pieces. The CIDR prefix (the /24 in 192.168.1.0/24) says how many leading bits identify the network; the rest identify hosts. A /24 reserves 24 bits for the network, leaving 8 for hosts — 256 addresses, 254 of them usable.

Why the network and broadcast addresses aren't usable

In every IPv4 subnet, the first address identifies the network itself and the last address is the broadcast (reaches all hosts at once). Neither can be assigned to a device, which is why a /24 gives 256 total but only 254 usable hosts.

Common prefix sizes

CIDRSubnet maskUsable hosts
/30255.255.255.2522
/29255.255.255.2486
/28255.255.255.24014
/24255.255.255.0254
/16255.255.0.065,534
/8255.0.0.016,777,214

Frequently Asked Questions

What does /24 mean?

The /24 is the prefix length: the first 24 bits are the network portion. That leaves 8 host bits, giving 256 total addresses (254 usable) — the classic home/office LAN size.

How many hosts can a /29 hold?

A /29 has 3 host bits = 8 total addresses, minus the network and broadcast = 6 usable hosts. It's commonly used for small point-to-point links and server blocks.

What's a wildcard mask?

It's the bitwise inverse of the subnet mask (e.g. 0.0.0.255 for a /24). Access-control lists and routing protocols like OSPF use wildcard masks to match address ranges.

Need binary or hex?

Convert IPv4 addresses between dotted-decimal, binary, hexadecimal and integer.

Open IP ⇄ Binary Converter