DevKits

CIDR / Subnet Calculator (IPv4)

Calculate IPv4 subnets from CIDR notation online. Get network address, broadcast, netmask, wildcard, usable host range, IP class, and binary representation. 100% local — nothing leaves your browser.

Last updated:

Try:

Subnet range

192.168.1.0192.168.1.255/24

256 total addresses · 254 usable hosts (192.168.1.1 192.168.1.254)

Class CPrivate (RFC 1918)

Network address

192.168.1.0

Broadcast address

192.168.1.255

Netmask

255.255.255.0

Wildcard mask

0.0.0.255

First usable host

192.168.1.1

Last usable host

192.168.1.254

Binary representation

Network11000000.10101000.00000001.00000000
Netmask11111111.11111111.11111111.00000000

Bits highlighted in brand color are the network portion (/24); the rest is the host portion.

Network as decimal

3,232,235,776

Broadcast as decimal

3,232,236,031

Enter an IPv4 CIDR block (e.g. 10.0.0.0/24) to compute the network address, broadcast address, netmask, wildcard mask, first / last usable host, and total addresses. Also does IP ↔ integer conversion. 100% local.

Tips & Best Practices

  • For subnets smaller than /31, the first and last address in the block are the network and broadcast respectively — not assignable to hosts.
  • /31 and /32 have special rules per RFC 3021 / RFC 4632; the calculator handles them correctly.
  • The IP-to-integer conversion is useful when storing IPs in a compact database column or comparing ranges.

Frequently Asked Questions

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) writes an IP address followed by a slash and the number of bits used for the network prefix, e.g. 192.168.1.0/24. The prefix defines the subnet size — /24 means 256 addresses, /16 means 65 536, and so on. It replaces the older Class A/B/C system.

Why does /24 give 254 usable hosts instead of 256?

A /24 has 256 total addresses, but the first (network address) and last (broadcast address) are reserved and cannot be assigned to hosts. That leaves 254 usable. Exception: /31 subnets (point-to-point per RFC 3021) let both addresses be assigned, and /32 represents a single host with 1 usable address.

Which IP ranges are private?

Per RFC 1918: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. RFC 6598 adds 100.64.0.0/10 for carrier-grade NAT. The tool flags any IP that falls into these ranges as private, plus loopback (127/8), link-local (169.254/16), and multicast (224/4).

Does this tool support IPv6?

Not yet — this calculator is IPv4 only. IPv6 subnet math requires 128-bit BigInt arithmetic and a different notation for private ranges. Consider adding IPv6 support to your feature request list.

Related Tools