Subnet Calculator
Calculate IP subnets, host ranges, and CIDR notation.
Network Address
192.168.1.0
Broadcast
192.168.1.255
Subnet Mask
255.255.255.0
Wildcard Mask
0.0.0.255
First Host
192.168.1.1
Last Host
192.168.1.254
Total Hosts
256
Usable Hosts
254
IP Class
Class C
IP Type
Private
CIDR
192.168.1.0/24
Binary Representation
IP Address: 11000000.10101000.00000001.01100100
Subnet Mask: 11111111.11111111.11111111.00000000
Network Address: 11000000.10101000.00000001.00000000
Subnet Calculator — What It Does
Enter any IPv4 address in CIDR notation (e.g., 192.168.1.0/24) and instantly see: network address, broadcast address, usable host range, subnet mask in dotted decimal and binary, total addresses, usable host count, and the binary representation of the IP and mask. Essential for network planning, firewall rules, AWS VPC design, and cloud security group configuration.
Common CIDR Subnet Reference
/8— Mask: 255.0.0.0 — 16,777,216 addresses (16,777,214 hosts)/16— Mask: 255.255.0.0 — 65,536 addresses (65,534 hosts)/24— Mask: 255.255.255.0 — 256 addresses (254 hosts) — most common LAN size/25— Mask: 255.255.255.128 — 128 addresses (126 hosts)/28— Mask: 255.255.255.240 — 16 addresses (14 hosts) — common for small subnets/30— Mask: 255.255.255.252 — 4 addresses (2 hosts) — point-to-point links/32— Single host address (used in routing and firewall rules)
Cloud Networking Use Cases
- AWS VPC design — A VPC typically uses a /16 (65k addresses), divided into /24 subnets per availability zone
- Security groups — Use /32 to allow a single IP, /24 for an office network range
- Kubernetes pod CIDR — Clusters often reserve a /16 for pod IP allocation
- Docker networks — Default bridge network uses 172.17.0.0/16; custom networks can use any private range
Subnetting Tips
- Plan for growth — Always allocate subnets larger than you need today; resizing later requires renumbering.
- Avoid overlapping ranges — Overlapping subnets in connected networks cause routing failures. Use this calculator to verify non-overlap.
- Use RFC 1918 ranges — Stick to 10.x.x.x, 172.16-31.x.x, or 192.168.x.x for internal networks to avoid conflicts with public IPs.
- Document subnet assignments — Maintain a IPAM (IP Address Management) record of which subnets are assigned to which environments.
Frequently Asked Questions
- What does the /24 or /16 mean after an IP address (CIDR notation)?
- CIDR (Classless Inter-Domain Routing) notation expresses the network prefix length — the number of bits in the subnet mask set to 1. /24 means 24 bits for network, 8 bits for hosts (255.255.255.0), giving 256 addresses (254 usable hosts). /16 means 16 network bits (255.255.0.0), giving 65,536 addresses.
- How many usable hosts does a subnet have?
- Usable hosts = 2^(32 − prefix length) − 2. Two addresses are reserved: the network address (all host bits = 0) and the broadcast address (all host bits = 1). So a /24 has 2^8 − 2 = 254 usable hosts. A /30 (common for point-to-point links) has 2^2 − 2 = 2 usable hosts.
- What are the private IP address ranges?
- RFC 1918 defines three private 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). These are not routable on the public internet and are used for internal networks behind NAT.
- What is the difference between network address, broadcast address, and host range?
- The network address is the first address in the subnet (all host bits 0) — it identifies the subnet itself and cannot be assigned to a host. The broadcast address is the last address (all host bits 1) — packets sent here reach all hosts in the subnet. The host range is every address in between, which can be assigned to devices.
- How do I split a network into smaller subnets (subnetting)?
- To create 2 subnets from a /24, increase the prefix by 1 to /25 — this splits the range into two halves. For 4 subnets, use /26. Each additional bit doubles the number of subnets but halves the host count per subnet. This is called Variable Length Subnet Masking (VLSM).