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
- Enter any IPv4 address (e.g. 192.168.1.1 or 10.0.0.1) or pick one of the network presets.
- Select the CIDR prefix (/0 to /32) from the dropdown list to adjust the subnet mask.
- Review the calculated network address, broadcast address, and first/last usable host addresses.
- Inspect the binary bit diagram to see which bits represent the network prefix versus host endpoints.
- 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?
Why do /31 and /32 subnets behave differently?
Can two overlapping subnets exist in the same routing table?
What are the RFC 1918 private address ranges?
Related tools
HTTP Status Code Lookup
Look up any HTTP status code: meaning, causes and how to fix it.
HTTP Header Analyzer
Paste HTTP headers to see what each means and what to fix.
HTTP Header Generator
Generate security, CORS, cache and CSP headers for your server.
User-Agent Parser
Identify the browser, OS, device or bot behind a User-Agent.