Subnet calculator
CIDR notation like 192.168.1.0/24 defines a network: /24 means 24-bit network prefix, 256 addresses, netmask 255.255.255.0. Enter IP and prefix length to see network address, broadcast, usable host range, and wildcard mask — for VPC design, firewall rules, and interview prep.
CIDR
Output
Network: 192.168.1.0
Broadcast: 192.168.1.255
First host: 192.168.1.1
Last host: 192.168.1.254
Host count: 254
Subnet mask: 255.255.255.0
Wildcard: 0.0.0.255
How to calculate a subnet
1. Enter IPv4 address and CIDR prefix (e.g. 10.0.0.0/16).
2. Read network address (first address) and broadcast (last).
3. Note usable host range excluding network and broadcast.
4. Apply results to AWS VPC CIDR or office LAN plan.
Subnet examples
Home /24 LAN
192.168.0.0/24 → network 192.168.0.0, hosts 192.168.0.1–254, broadcast 192.168.0.255.
Point-to-point /30
10.0.0.0/30 gives 4 addresses — 2 usable for router ends of link.
AWS /16 VPC
10.0.0.0/16 spans 65536 addresses for slicing into /24 subnets per AZ.
When subnet calculator helps
• When planning cloud VPC CIDR blocks without overlap.
• When writing firewall allow rules for CIDR ranges.
• When learning CCNA-style networking fundamentals.
Calculator limits
• When IPv6 /64 planning needs different mental model — verify IPv6 support.
• When routing policy and BGP ASN semantics — beyond subnet math.
• When overlapping corporate VPN ranges — also need organizational IPAM registry.
Network and broadcast addresses
First address identifies network; last is broadcast on legacy Ethernet IPv4. Modern networks sometimes use /31 for point-to-point without broadcast.
VPC subnet sizing
AWS reserves 5 addresses per subnet — plan host count accordingly. Leave room for growth when picking /20 vs /24.
Avoiding overlap
Corporate VPN 10.8.0.0/24 colliding with cloud 10.8.0.0/24 breaks routing — document IPAM before multi-cloud expand.
Binary intuition
/26 means 6 host bits → 64 addresses. Learn powers of two: /24=256, /25=128, /26=64, /27=32.
Frequently asked questions
What is CIDR?
Classless Inter-Domain Routing — IP/prefix length replaces old class A/B/C netmasks.
Usable host count?
2^(32-prefix) minus 2 for network and broadcast on classic IPv4 subnet.
/32 meaning?
Single host route — one address, common for firewall /32 host rules.
Private ranges?
10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 — RFC1918 non-routable on internet.
Wildcard mask?
Inverse of netmask for ACL — 0.0.0.255 for /24 in Cisco ACLs.
Local calculation?
Yes — bitwise math in browser.
Split subnet?
Divide /16 into /24s — calculate each child CIDR sequentially.