IP Subnet Calculator

CIDR & Host Range

Calculate IPv4 network, mask, wildcard, broadcast, and usable host range from a CIDR prefix. Live /31 and /32 handling in your browser.

IPv4 CIDR math runs in your browser. Addresses are not uploaded.

  • CIDR/24

What is this tool?

This IPv4 subnet calculator turns an address and CIDR prefix into network address, subnet mask, wildcard mask, broadcast, first/last host, and usable host count. Results update live as you type; Sample loads 192.168.0.0/24.

CIDR prefix length (0–32) is how many leading bits belong to the network. A /24 leaves 8 host bits (256 addresses); a /30 leaves 2 host bits and is common for tiny point-to-point links.

IPv6 is out of scope—paste a : address and the tool shows an explicit error instead of guessing.

Common use cases

  • Size a VPC, VLAN, or firewall allowlist before opening a change window
  • Confirm broadcast and usable range when a ticket only lists a host IP plus /nn
  • Check /31 or /32 special cases used by routers and cloud route tables

How to use

  1. Enter an IPv4 address (or paste a.b.c.d/nn into the address field).
  2. Set the CIDR prefix from 0 to 32 — the result table updates live.
  3. Copy the summary for tickets, ACLs, or runbooks.
  4. Use Clear to reset; Sample restores 192.168.0.0/24.

Private IPv4 ranges (RFC 1918)

RangePrefixTypical use
10.0.0.010.255.255.255/8Large enterprise / cloud VPC
172.16.0.0172.31.255.255/12Mid-size private networks
192.168.0.0192.168.255.255/16Home and small office LAN

These blocks are not routable on the public Internet. Overlapping them across VPN tunnels or peered VPCs is a common outage cause.

Examples

InputNetwork / maskHosts (usable)Notes
192.168.1.10 /24192.168.1.0 / 255.255.255.0192.168.1.1192.168.1.254 (254)Common private LAN
10.0.0.5 /3010.0.0.4 / 255.255.255.25210.0.0.510.0.0.6 (2)Tiny point-to-point
203.0.113.1 /31203.0.113.0 / 255.255.255.254203.0.113.0203.0.113.1 (2)RFC 3021-style /31
198.51.100.8 /32198.51.100.8 / 255.255.255.255198.51.100.8 (1)Single-host route

Practical pitfalls

  • /31 and /32 are not “total − 2”: Many textbooks assume every subnet loses network + broadcast. This tool (and most routers) treat /31 as two usable addresses and /32 as one—matching cloud and ISP practice.
  • IPv6 not supported: Do not paste 2001:db8::/64 here; you will get an explicit error. Prefix math and host counting differ for IPv6.
  • Entering a host IP (not the network base) is fine—the mask still yields the canonical network—but overlapping RFC 1918 ranges across sites will break routing even if the calculator looks correct.

References

Last reviewed: 2026-07-27

Frequently asked questions

Does this support IPv6?
No. This calculator is IPv4 CIDR only (prefix 0–32). Paste an IPv6 address and you will see an explicit unsupported error—use a dedicated IPv6 subnet tool instead.
How are /31 and /32 handled?
Per common point-to-point practice (RFC 3021 for /31), /31 reports 2 usable addresses (network and broadcast are both usable hosts). /32 is a single-host route with 1 address. Classic “minus 2” host math applies only for prefixes ≤ /30.
Do I need the network address, or can I paste any host in the subnet?
Any IPv4 in the block works. The tool masks the address with the prefix and shows the canonical network and broadcast for that CIDR.
What are the RFC 1918 private ranges?
`10.0.0.0/8`, `172.16.0.0/12`, and `192.168.0.0/16`. They are not routable on the public Internet; cloud VPCs and home LANs use them heavily.