Home / Subnet Calculator

IPv4 Subnet Calculator

IP and CIDR in — network address, mask, wildcard, broadcast, usable host range, and counts out. Instant, accurate, no tables to memorize.

Why Use This Tool?

Subnetting questions decide whether two devices can talk: what's the network address, where does the range start and end, how many hosts fit. This calculator answers all of them from just an IP and a CIDR prefix — using proper bit arithmetic, not lookup tables.

The wildcard mask for ACLs, the broadcast address, and the usable host count (total minus network and broadcast) are all included, which covers most firewall and router configuration forms.

How It Works

  1. Enter any IPv4 address in the subnet.
  2. Enter the CIDR prefix — /24 is the classic class C.
  3. Read the network, broadcast, host range, and mask for your configuration.

Frequently Asked Questions

How do I calculate a subnet from an IP and CIDR?

The network address is the IP bitwise-ANDed with the mask derived from the CIDR; broadcast is the network with all host bits set. The calculator does the bit math for any prefix from /0 to /32.

How many usable hosts are in a /26?

62 — 64 total addresses minus the network and broadcast addresses. The usable count is always total minus 2, except at /31 and /32.

What is a wildcard mask?

The inverse of the subnet mask, used in firewall and router ACLs: a /26 mask of 255.255.255.192 has wildcard 0.0.0.63.

Tips & Things to Watch

  • /31 and /32 are special cases — the tool handles their two- and one-address ranges correctly.
  • The first host is network + 1, the last is broadcast − 1.
  • Wrong subnet masks are the top cause of 'can ping some devices but not others'.