Skip to content
ToolStaxx Tools that stack up

Tech & Files

IPv4 Subnet Calculator

Enter an IPv4 address and CIDR prefix to calculate the network, broadcast, usable range and host count.

Use this for planning and notes. Always confirm actual gateway, DHCP and firewall settings on the live network.
How it works

Calculate the network, broadcast, usable range and host count from an IPv4 address and CIDR prefix.

Formula used: CIDR prefix sets the subnet mask. Host count is 2^(32-prefix) minus reserved network/broadcast addresses for most subnets.

Worked example

192.168.1.25/24 gives network 192.168.1.0, broadcast 192.168.1.255 and 254 usable hosts.

Common mistakes
  • Confusing gateway address with network address.
  • Forgetting /31 and /32 behave differently.
  • Mixing decimal and binary subnet assumptions.
Related tools

Next useful tools for this task.

FAQ

What does the CIDR number mean?

The prefix length shows how many address bits identify the network. A /24 commonly provides 256 total IPv4 addresses.

Is the first and last address usable?

In traditional IPv4 subnets, the first is the network address and the last is the broadcast address, with special cases such as /31 and /32.