Subnet Calculator

Calculate IPv4 & IPv6 subnets — network, broadcast, mask, and host range

Free subnet calculator and CIDR calculator for network engineers and developers. Enter an IP and prefix to get network address, broadcast, subnet mask, wildcard mask, usable hosts, and host range. Supports IPv4 subnet calculator and IPv6 prefix modes. 100% client-side — your IPs never leave the browser.

From the blog
Lease Pattern in Distributed Systems Explained

How time-bound leases give cluster nodes exclusive access without holding it forever when things go wrong

Read

Developer tools Latest posts Explainers

Prefix
Common Subnets
Network Address
Broadcast Address
First Usable Host
Last Usable Host
Usable Hosts
Total Addresses
Subnet Mask
Wildcard Mask
Mask (Binary)
CIDR Notation
IP Class
Scope
IP Type
Hex IP
Integer IP

Split Subnet (VLSM)

(must be longer than current prefix)
Prefix
Expanded Address
Compressed Address
Network Prefix
First Address
Last Address
Total Addresses
Address Type

CIDR Subnet Mask Cheat Sheet

Click any row to apply that CIDR prefix in the IPv4 calculator. Subnet mask, wildcard mask, and host counts for /0 through /32.

CIDR Subnet Mask Wildcard Usable Hosts Total Addresses

Click any row to load that prefix in the calculator

Subnetting & CIDR Guide

How CIDR Subnetting Works

CIDR (Classless Inter-Domain Routing) replaces old classful networks (Class A, B, C) with flexible prefix lengths. An address like 10.0.5.20/22 means the first 22 bits identify the network; the remaining 10 bits are for hosts.

To find the network address, bitwise-AND the IP with the subnet mask. To find the broadcast, OR the network with the inverted mask (wildcard mask).

Subnet Mask vs Wildcard Mask

The subnet mask uses 1s for network bits and 0s for host bits. A wildcard mask flips this — 0s where bits must match, 1s where bits are ignored. ACLs on Cisco gear use wildcard masks: 0.0.0.255 matches any host in the last octet.

Private IP Ranges (RFC 1918)

  • 10.0.0.0/8 — 16,777,216 addresses (large corporate networks)
  • 172.16.0.0/12 — 1,048,576 addresses (medium networks)
  • 192.168.0.0/16 — 65,536 addresses (home and office LANs)

Common Subnet Sizes

  • /32 — Single host route (1 address)
  • /30 — Point-to-point WAN link (2 usable hosts)
  • /24 — Typical VLAN or office subnet (254 usable hosts)
  • /16 — Large site block (65,534 usable hosts)
  • /8 — Very large allocation (16M+ hosts)

IPv6 Prefixes

IPv6 subnets are almost always /64 on LANs — one subnet per interface with a vast address space. fc00::/7 is Unique Local (ULA, like private IPv4). fe80::/10 is link-local. Use the IPv6 tab above for prefix calculations.

Subnet Calculator FAQ

What is a subnet calculator?

A subnet calculator computes network details from an IP address and CIDR prefix or subnet mask: network address, broadcast, host range, mask, wildcard, and usable host count.

What is CIDR notation?

CIDR notation appends a slash and prefix length to an IP, e.g. 192.168.1.0/24. The number 24 means 24 network bits — mask 255.255.255.0 and 254 usable hosts.

How many hosts are in a /24 subnet?

A /24 has 256 total addresses. Subtract network and broadcast for 254 usable hosts. Mask: 255.255.255.0.

What is the difference between subnet mask and wildcard mask?

Subnet mask marks network bits (1s). Wildcard mask is the inverse — used in ACLs. For /24: mask 255.255.255.0, wildcard 0.0.0.255.

What is a /30 subnet used for?

/30 gives 4 addresses (2 usable) — ideal for router-to-router point-to-point links with minimal waste.

What are private IP address ranges?

RFC 1918: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16. Not routable on the public internet.

How do I convert CIDR to subnet mask?

Add consecutive 1 bits left to right in a 32-bit word. /24 → 255.255.255.0. This tool converts automatically when you change the prefix slider.

What is VLSM subnetting?

VLSM uses different prefix lengths in one network. Split a /24 into four /26 subnets using the Split Subnet section above.

How does IPv6 subnetting work?

IPv6 uses 128-bit addresses. Typical LAN prefix is /64. Enter an address in the IPv6 tab to see expanded, compressed, and network prefix forms.

What is the network address vs broadcast address?

Network address = all host bits 0. Broadcast = all host bits 1. Neither is assigned to a host interface.

Is this subnet calculator free?

Yes — 100% free, runs in your browser, no signup, no server uploads.

What does /32 mean in CIDR?

/32 is a single-host route with mask 255.255.255.255 — one IP, often used for host routes or loopbacks.