Boneyard Tools

IPv4 Subnet Calculator

Enter an IPv4 address in CIDR notation to see the network and broadcast addresses, subnet mask, wildcard mask, usable host range and total host count. Everything is computed in your browser.

How to use the subnet calculator

  1. Type an IPv4 address with a prefix, for example 192.168.1.0/24.
  2. Read the results table for network, broadcast, mask and host range.
  3. Adjust the prefix to widen or narrow the subnet and recompute instantly.

Examples

A /24 home network

192.168.1.0/24
Network 192.168.1.0, broadcast 192.168.1.255, mask 255.255.255.0, 254 usable hosts (.1 to .254).

A /30 point-to-point link

192.168.1.10/30
Network 192.168.1.8, broadcast 192.168.1.11, 2 usable hosts (.9 and .10).

Frequently asked questions

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) writes an address and prefix length together, like 192.168.1.0/24. The /24 means the first 24 bits are the network portion and the remaining 8 bits address hosts.

What is the difference between the network and broadcast address?

The network address is the first address in the block, with all host bits set to 0, and identifies the subnet itself. The broadcast address is the last address, with all host bits set to 1, and reaches every host on the subnet. Neither is normally assigned to a device.

Why are usable hosts two fewer than the total?

For a /30 or larger block, the network and broadcast addresses are reserved, so usable hosts equals total addresses minus 2. A /31 has 2 usable addresses for point-to-point links (RFC 3021), and a /32 describes a single host.

What is the difference between a subnet mask and a wildcard mask?

A subnet mask marks network bits with 1s, like 255.255.255.0 for a /24. A wildcard mask is its bit-for-bit inverse, like 0.0.0.255, and is used in access control lists and routing rules to match the host bits.

Does this work for private and public addresses?

Yes. The math is the same for any IPv4 address, whether it is in a private range such as 10.0.0.0/8 or a public one. The class label (A to E) is the historical classful class based on the first octet.

Is my input sent to a server?

No. All calculations run locally in your browser using 32-bit integer math, so the addresses you enter never leave your device.

Related tools