Networking / United States

IP subnet calculator

Enter an IPv4 address and CIDR prefix to calculate the network, broadcast, subnet mask, usable hosts, and AWS VPC IP counts.

English IPv4 AWS VPC ready

Calculate subnet details

You can paste a combined IPv4/CIDR value like 10.0.1.15/24 into the IP field.

Formula

IPv4 subnetting uses the CIDR prefix to split the 32-bit address space into network and host bits.

Network address: floor(IP / subnet size) × subnet size

Subnet size: 2^(32 - prefix)

Assumptions

  • Works with IPv4 dotted decimal input only.
  • Standard mode uses classic network and broadcast calculations.
  • AWS VPC mode applies AWS reserved address rules.

Quick example

10.0.1.15/24 becomes the canonical CIDR 10.0.1.0/24.

The subnet mask is 255.255.255.0 and the usable host count is 254 in standard mode.

In AWS VPC mode, the same subnet has 249 usable addresses because AWS reserves five IPs.

Common mistakes

  • Confusing total addresses with usable addresses.
  • Forgetting that AWS reserves the first four IPs and the last IP.
  • Using /31 or /32 in AWS VPC mode.
  • Mixing up subnet masks and wildcard masks.

Need help?

Read the full instructions and subnetting examples.

Visit the networking calculators section.

Need a VPC subnet plan? Open the AWS VPC subnet planner.