Subnet Calculator
Enter an IPv4 address and CIDR prefix to instantly calculate the network address, broadcast, subnet mask, wildcard mask, usable hosts, and more.
IPv4 Subnet Calculator
Subnet Details
- Network Address—
- Broadcast Address—
- Subnet Mask—
- Wildcard Mask—
- Total Addresses—
- Usable Hosts—
- First Usable IP—
- Last Usable IP—
- CIDR Notation—
Understanding CIDR Notation
CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its subnet mask together, like 192.168.1.0/24. The number after the slash is the prefix length — how many bits are fixed in the network portion.
Common Subnet Sizes
The most frequently used prefixes are /8 (Class A, 16 million hosts), /16 (Class B, 65,534 hosts), /24 (Class C, 254 hosts), and /30 (point-to-point, 2 hosts). For VLSM (Variable Length Subnet Masking), any prefix from /0 to /32 is valid.
Private IP Address Ranges (RFC 1918)
These ranges are reserved for private use and are not routable on the public internet:
- 10.0.0.0/8 — Class A private, 16,777,216 addresses. Common in large enterprise networks.
- 172.16.0.0/12 — Class B private range (172.16.0.0 – 172.31.255.255). Often used in medium-sized networks.
- 192.168.0.0/16 — Class C private, the most common range for home and small office networks.
- 169.254.0.0/16 — Link-local (APIPA). Assigned automatically when DHCP fails.
Practical Examples
Example 1: A home network on 192.168.1.0/24
Usable: 192.168.1.1 – 192.168.1.254 (254 hosts)
Example 2: A point-to-point link on 10.0.0.0/30
Usable: 10.0.0.1 – 10.0.0.2 (2 hosts — one per end of the link)
Example 3: An enterprise /22 block giving 1,022 hosts
Planning Gateways and DHCP
- The gateway (default router) is typically the first or last usable host in the subnet.
- Reserve a small static range at the start of the subnet for infrastructure (switches, APs, printers).
- DHCP pools should avoid the reserved static IPs. For a /24, a common split is .1–.20 static, .100–.254 DHCP.
- Always leave room to grow — a /24 for a 50-device office gives plenty of room for expansion.