Skip to main content

subnet-calculator

A subnet calculator computes IP-network properties from CIDR notation (e.g. 192.168.1.0/24) β€” the network address, broadcast address, usable host range, total host count, subnet mask in dotted-decimal, and binary representation. Network engineers and sysadmins use it daily for planning IP allocation, configuring routers, and troubleshooting network issues. The ZTools Subnet Calculator handles both IPv4 (32-bit) and IPv6 (128-bit) addressing, supports VLSM (variable-length subnet mask) calculations, and provides a hosts-per-subnet table for splitting a /24 into smaller subnets.

Use cases​

Network design / VLAN planning​

Allocating IP ranges across VLANs, departments, or customers. /24 (256 addresses) is too big for a small office; /28 (16 addresses) is right-sized.

Cloud VPC subnet planning​

AWS / GCP / Azure VPCs need subnet CIDR planning. Avoid overlap with on-prem ranges, account for future growth, leave room for AWS reserved addresses (5 per subnet).

Firewall rules / ACLs​

Allow source 10.0.0.0/16 β†’ expand to range; deny 192.168.5.0/27 β†’ calculate exact addresses covered.

CCNA / network certification study​

Subnetting is a core skill on networking certs (CCNA, CompTIA Network+). Calculator validates manual answers during practice.

How it works​

  1. Enter IP/CIDR β€” 192.168.1.100/24 or 2001:db8::/32. Both notations supported.
  2. Or pick mask β€” Mask in dotted-decimal (255.255.255.0) auto-converts to /24.
  3. View results β€” Network, broadcast, first host, last host, total hosts, mask in multiple notations, binary, hex.
  4. Subnet division (VLSM) β€” Split a /24 into N smaller subnets; calculator generates the table of resulting CIDR blocks.
  5. IP-in-subnet check β€” Test if a specific IP falls within a subnet. Useful for ACL verification.

Examples​

Input: 192.168.1.0/24

Output: Network: 192.168.1.0; Broadcast: 192.168.1.255; Hosts: 254; Mask: 255.255.255.0.


Input: 10.0.0.0/16 split into 4 equal subnets

Output: 10.0.0.0/18, 10.0.64.0/18, 10.0.128.0/18, 10.0.192.0/18 β€” 16,382 hosts each.


Input: 2001:db8::/64

Output: IPv6 /64 = 2^64 addresses (~18 quintillion). Host range covers entire /64; first host 2001:db8::1.

Frequently asked questions​

Why does a /24 have 254 hosts and not 256?

Network address (.0) and broadcast address (.255) are reserved. 256 total addresses minus 2 = 254 usable hosts. AWS reserves an additional 3 (so 251 usable in AWS VPCs).

What's VLSM?

Variable-Length Subnet Masking β€” splitting an IP range into subnets of different sizes. Example: a /24 into a /25 (128 addresses) plus 2 /26s (64 each). Allows efficient address allocation.

Difference between /24 and 255.255.255.0?

Same thing in different notation. /24 means "24 ones in the mask"; 255.255.255.0 in binary is 11111111.11111111.11111111.00000000 = 24 ones.

Can I subnet IPv6?

Yes β€” IPv6 uses identical CIDR notation. Common practice: allocate /48 to organisations, /64 per LAN.

How does AWS subnet differ?

AWS reserves 5 addresses per subnet (.0, .1, .2, .3, .last). Subtract 5 from total host count for usable AWS VPC subnet capacity.

What's a /31 subnet?

Used for point-to-point links (RFC 3021). Only 2 addresses, both usable as hosts (no broadcast). Common between routers.

Tips​

  • Always reserve 20–30% growth headroom in subnet sizing β€” bigger now is cheaper than re-numbering later.
  • Document your subnet plan (spreadsheet or IPAM tool) before deploying β€” drift is brutal to fix.
  • For AWS VPC, account for the 5 reserved addresses per subnet.
  • Use private RFC1918 ranges (10/8, 172.16/12, 192.168/16) for internal β€” never public space without ownership.
  • Avoid 169.254/16 (link-local, used by APIPA) and 224/4 (multicast) for production subnets.

Try it now​

The full subnet-calculator runs in your browser at https://ztools.zaions.com/subnet-calculator β€” no signup, no upload, no data leaves your device.

Open the tool β†—


Last updated: 2026-05-06 Β· Author: Ahsan Mahmood Β· Edit this page on GitHub