IP Subnet Calculator

Next

Enter an IPv4 address in CIDR form (192.168.1.0/24) and the calculator returns the network address, broadcast, first and last usable host, total host count, subnet mask, wildcard mask and binary form. Supports /31 point-to-point links and /32 host routes, and can split a parent block into equally sized subnets.

How to calculate a subnet

  1. 1

    Enter CIDR notation

    Type `10.0.0.0/8`, `192.168.1.0/24`, `172.16.5.128/29`: the tool parses any valid IPv4 CIDR.

  2. 2

    Read the breakdown

    Network, broadcast, first/last usable host, total hosts, subnet mask and wildcard mask.

  3. 3

    Check binary form

    Toggle binary view to see the 32-bit layout with the network/host boundary marked.

  4. 4

    Optionally split

    Enter a child prefix length to split the parent block into smaller subnets with each range listed.

CIDR quick reference

Prefix Mask Usable hosts Common use
/30 255.255.255.252 2 Point-to-point WAN
/29 255.255.255.248 6 Small office segment
/28 255.255.255.240 14 Server VLAN
/27 255.255.255.224 30 Mid office segment
/26 255.255.255.192 62 Department VLAN
/25 255.255.255.128 126 Branch office
/24 255.255.255.0 254 Classic “slash 24” LAN
/23 255.255.254.0 510 Large LAN
/22 255.255.252.0 1022 Campus segment
/16 255.255.0.0 65,534 Private tier-1

Usable vs total hosts

A /24 has 256 total addresses. Two are reserved: the network address (first) and the broadcast address (last), leaving 254 usable hosts.

Exceptions:

  • /31 (RFC 3021) is used for point-to-point links with no network/broadcast reservation, 2 usable.
  • /32 is a single-host route (loopback, VIP), 1 address, 1 usable.

Wildcard mask

Used by Cisco ACLs and OSPF: the bitwise NOT of the subnet mask.

Mask:     255.255.255.0     = 11111111.11111111.11111111.00000000
Wildcard: 0.0.0.255         = 00000000.00000000.00000000.11111111

A 1 in the wildcard means “ignore this bit when matching”. A /24 matches on the first 24 bits and ignores the last 8.

Private address ranges (RFC 1918)

Block Size
10.0.0.0/8 16.7M IPs
172.16.0.0/12 1M IPs
192.168.0.0/16 65k IPs

Common mistakes

  • Off-by-one on the broadcast. A /24 ending in .255 has .254 as the last usable host, not .255.
  • Assuming all /24s are private. 8.8.8.0/24 is public Google DNS; 192.168.1.0/24 is private. Check RFC 1918 before deploying.
  • Overlapping subnets in routing tables. A /16 that contains a /24 of another team’s site will break reachability.
  • Forgetting /31 for point-to-point. Using /30 wastes half the addresses on network + broadcast.

Frequently Asked Questions

254 usable hosts. A /24 is 256 addresses total, but the first (network) and last (broadcast) are reserved, leaving 254 you can assign to devices.

RFC 3021 allows /31 subnets on point-to-point links without the network/broadcast overhead. Both addresses become usable, which halves the IP consumption of WAN infrastructure.

This version focuses on IPv4. For IPv6 subnets (/48, /56, /64, etc.) use the dedicated IPv6 subnet calculator, the arithmetic is similar but the address space is vast.

Enter the parent as /24 and set “split to /26”. You get four subnets: .0/26, .64/26, .128/26 and .192/26, each with 62 usable hosts.

Related Tools

Tool available in other languages