IP Subnet Calculator

Calculate Subnet

IP Version

Results

How to Use This IP Subnet Calculator

Subnetting homework and live network setup both reduce to the same headache: you have an IP and a mask, and you need the network address, broadcast, and host range without bitwise math errors. I have typed the wrong prefix more than once and wondered why ping tests failed. This calculator handles IPv4 and IPv6 in one place.

  • Select IP Version. Choose IPv4 or IPv6 at the top of the form.
  • IPv4: Enter a dotted-decimal address (e.g., 192.168.1.10) and pick CIDR prefix /1 through /32 (default /24).
  • IPv6: Enter a full or compressed address (including ::) and select prefix length /1 through /128 (default /64).
  • Press Calculate. Review network address, host range, broadcast (IPv4), and host counts.

For download time estimates on your network, try the Bandwidth Calculator.

IP Subnet Calculator Formulas and Practical Applications

IPv4 subnetting is bitwise AND between the IP and subnet mask—the network address is whatever bits survive that filter. Think of the mask as a stencil: network bits stay fixed, host bits vary across your LAN.

Network = IP AND Subnet Mask

Broadcast = Network OR (NOT Mask)

Total Hosts = 2^(32 − CIDR)

Usable hosts subtract network and broadcast on most subnets: total minus 2. Exceptions: /31 point-to-point links (RFC 3021, two usable endpoints) and /32 (single host). IPv6 uses 128-bit addresses—typical LAN assignments are /64 subnets carved from an ISP-delegated /48 or /56.

Standard Units and Conversion Tables

  • CIDR /24: Mask 255.255.255.0 — 256 addresses, 254 usable hosts.
  • CIDR /16: Mask 255.255.0.0 — 65,536 addresses (classful B territory).
  • CIDR /8: Mask 255.0.0.0 — 16,777,216 addresses.
  • IPv6 /64: Standard per-segment prefix—one LAN or VLAN.
  • Private IPv4 ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16.

Frequently Asked Questions

What is the difference between CIDR and subnet mask?

They express the same thing differently. /24 equals subnet mask 255.255.255.0—24 network bits and 8 host bits. CIDR notation is compact; dotted mask is legacy but still common in router configs.

Why does /31 have usable hosts?

RFC 3021 allows /31 for point-to-point links between two routers where broadcast is unnecessary. Both addresses can serve as usable endpoints.

What prefix should I use for home IPv6?

/64 is standard for LAN segments—one subnet per VLAN or Wi-Fi network. Your ISP typically delegates a /56 or /48; split that into multiple /64s for internal networks.

How many usable hosts are in a /24 subnet?

A /24 has 256 total addresses. After reserving network and broadcast, 254 are usable for host assignment on typical LANs.

Can I enter IPv6 addresses in compressed form?

Yes. Enter full or compressed IPv6 notation including :: shorthand. The calculator expands the address and applies your selected prefix length.

Disclaimer. RapidRatio is informational only—not network engineering sign-off. Verify subnet plans against your organization's addressing policy before deployment.