IPv4 Subnet Calculator

Enter an IP address with a prefix length (CIDR) or a subnet mask to get everything about its subnet: network and broadcast address, the range of usable hosts, how many hosts fit, the wildcard mask and whether the address is private or public. A binary view shows exactly where the network part ends.

Runs in your browser — nothing is uploaded

Useful for:Developers

How to use it

  1. Type an IPv4 address, optionally followed by a prefix: 192.168.1.10/24. A dotted mask also works: 192.168.1.10 255.255.255.0.
  2. If the address has no prefix, choose one from the list; it also shows the matching subnet mask.
  3. Read the results. Every row has a Copy button for pasting into router configs or documentation.
  4. Use the binary view to see the network bits (highlighted) and the host bits.

Common uses

  • Planning address ranges for an office network, VLANs or a home lab.
  • Configuring routers, firewalls and access lists that need a wildcard mask.
  • Sizing cloud networks (VPCs and subnets) before creating them.
  • Checking whether two IP addresses are in the same subnet.
  • Studying for networking certifications such as CCNA or Network+.

Examples

InputResult
192.168.1.10/24Network 192.168.1.0 · Broadcast 192.168.1.255 · Hosts .1–.254 (254)
172.16.5.4/20Network 172.16.0.0 · Broadcast 172.16.15.255 · 4,094 hosts
203.0.113.77/27Network 203.0.113.64 · Hosts .65–.94 (30)A /27 block holds 32 addresses.
192.168.0.1 255.255.255.252/30 · Hosts 192.168.0.1–192.168.0.2 (2)A classic point-to-point subnet.
10.0.0.0/816,777,214 usable hosts · Private (RFC 1918)
198.51.100.10/312 usable addresses/31 links use both addresses (RFC 3021).

Frequently asked questions

What does CIDR notation mean?

The number after the slash is the prefix length: how many leading bits of the address identify the network. In 192.168.1.0/24 the first 24 bits are the network, leaving 8 bits, or 256 addresses, for that subnet.

How many usable hosts does a /24 have?

254. A /24 contains 256 addresses, but the first (network address) and the last (broadcast address) can't be assigned to devices. The general formula is 2^(32 − prefix) − 2.

Why do /31 and /32 show no reserved addresses?

A /32 is a single address, used for loopbacks and host routes. A /31 has two addresses and, under RFC 3021, both can be used on point-to-point links, so no network or broadcast address is reserved.

What is a wildcard mask?

The bitwise inverse of the subnet mask: 255.255.255.0 becomes 0.0.0.255. Cisco access lists and OSPF configuration use wildcard masks to say which bits must match.

Does the calculator support IPv6?

Not yet. It covers IPv4 addresses and prefixes from /0 to /32.