Skip to content
TabBench

Subnet Calculator

Calculate IPv4 and CIDR subnets, host ranges, netmasks, broadcast addresses, and binary bit masks.

Runs in your browser. Nothing you add is uploaded.

What the Subnet Calculator does

IPv4 subnetting is fundamental to network architecture, whether you are planning an on-premise office LAN, configuring Kubernetes pod CIDR ranges, or provisioning virtual private clouds (VPCs) in AWS or GCP. This calculator computes network boundaries, broadcast addresses, and usable host pools in real time, displaying both decimal addresses and a color-coded binary bit breakdown. Everything is evaluated locally in your browser with zero latency.

How to calculate IPv4 subnets

  1. Enter any IPv4 address (e.g. 192.168.1.1 or 10.0.0.1) or pick one of the network presets.
  2. Select the CIDR prefix (/0 to /32) from the dropdown list to adjust the subnet mask.
  3. Review the calculated network address, broadcast address, and first/last usable host addresses.
  4. Inspect the binary bit diagram to see which bits represent the network prefix versus host endpoints.
  5. Click any row in the quick CIDR reference table to jump to a specific subnet mask or copy the full summary.

The Subnet Calculator runs entirely in your browser — nothing you enter is uploaded, stored, or logged.

When to use it

Cloud VPC and Subnet Allocation

When designing AWS VPCs or Google Cloud subnets, finding the right CIDR block prevents overlapping IP spaces between staging, production, and VPN interconnects.

Router and Firewall Configuration

Network engineers configuring Cisco or Juniper firewalls need exact wildcard masks and broadcast boundaries to write precise access control lists (ACLs).

Point-to-Point WAN Connections

Easily verify RFC 3021 /31 subnets for point-to-point router links that save precious IPv4 address space without dedicating broadcast addresses.

Good to know

  • Remember that usable hosts equal 2^(32 - CIDR) - 2 for standard subnets (reserving network and broadcast).
  • Use /24 (255.255.255.0) for standard 254-host office networks and /20 or /16 for cloud VPCs.
  • The wildcard mask is simply the bitwise inverse of the subnet mask: 255.255.255.255 minus the netmask.

Frequently asked questions

What is the difference between network address and broadcast address?

The network address is the first address in a subnet used to identify the network itself. The broadcast address is the last address in the subnet used to send packets to all devices simultaneously. Neither can be assigned to an individual host.

Why do /31 and /32 subnets behave differently?

A /32 prefix represents a single host (often used for loopback interfaces). A /31 prefix has 2 addresses and is defined under RFC 3021 for point-to-point links where broadcast and network addresses are not required.

Can two overlapping subnets exist in the same routing table?

Routers use longest prefix match (LPM) routing, directing packets to the most specific matching prefix (e.g. /28 over /24). However, having overlapping subnets across different VPCs without NAT causes severe routing conflicts.

What are the RFC 1918 private address ranges?

10.0.0.0/8 (10.0.0.0 - 10.255.255.255), 172.16.0.0/12 (172.16.0.0 - 172.31.255.255), and 192.168.0.0/16 (192.168.0.0 - 192.168.255.255).