IPv4 CIDR Subnet Calculator

Enter any IPv4 address and CIDR prefix (`/8` to `/32`) to calculate the network ID, dotted-decimal subnet mask, wildcard mask, broadcast address, and usable host IP range.

Enter an IPv4 address and CIDR prefix, then click Calculate Subnet.

How to Read IPv4 Subnet Calculator Results

Every IPv4 subnet divides a 32-bit address into two portions: the Network Prefix (the leading bits locked by the CIDR mask, such as the first 24 bits in a /24 network) and the Host Identifier (the remaining trailing bits assigned to individual devices). In standard networks (`/8` through `/30`), two addresses in every block are reserved by protocol design and cannot be assigned to computers or routers:

  • Network ID (First Address): All host bits are set to 0 (e.g., 192.168.1.0 in 192.168.1.0/24). Identifies the route itself in routing tables.
  • Usable Host Range: Runs from Network ID + 1 through Broadcast - 1 (e.g., 192.168.1.1 to 192.168.1.254). Usually, .1 or .254 is assigned to the Default Gateway router.
  • Broadcast Address (Last Address): All host bits are set to 1 (e.g., 192.168.1.255). Packets sent here are delivered to every interface on that local broadcast domain.

Common Small Office & Home LAN CIDR Reference Table

CIDR PrefixSubnet MaskWildcard MaskTotal IPsUsable HostsTypical Use Case
/32255.255.255.2550.0.0.011 (Single Host)Firewall host rule / Loopback / WireGuard peer
/30255.255.255.2520.0.0.342Point-to-point router-to-router WAN/VPN link
/29255.255.255.2480.0.0.786Business static WAN IP block (5 usable + 1 gateway)
/28255.255.255.2400.0.0.151614Small isolated management or NVR camera VLAN
/26255.255.255.1920.0.0.636462Departmental VoIP phone or IoT device VLAN
/24255.255.255.00.0.0.255256254Standard home & small office LAN subnet
/23255.255.254.00.0.1.255512510Growing office or guest WiFi network
/22255.255.252.00.0.3.2551,0241,022Large mesh network (default on Amazon eero)

RFC 1918 Private IPv4 Ranges for Local Networks

When designing internal VLANs or changing your router's LAN subnet to avoid VPN collisions (since 192.168.1.0/24 and 192.168.0.0/24 frequently collide with remote coffee-shop or hotel networks), always pick addresses inside the three IANA-reserved RFC 1918 private blocks:

  • Class A Private Block: 10.0.0.0/8 (10.0.0.0 – 10.255.255.255) — Ideal for clean VLAN numbering such as 10.10.20.0/24 for VLAN 20.
  • Class B Private Block: 172.16.0.0/12 (172.16.0.0 – 172.31.255.255) — Great for WireGuard/OpenVPN tunnel subnets that rarely overlap with home routers.
  • Class C Private Block: 192.168.0.0/16 (192.168.0.0 – 192.168.255.255) — Used by default on consumer routers; pick an uncommon third octet like 192.168.45.0/24 if hosting a VPN server.