Hi! I'm your CalcDigi AI assistant. Ask me anything about calculations, finance, health metrics, or math concepts. Please don't share personal or sensitive information.
Loadingโฆ
IP Subnet Calculator
Calculate subnet mask, network address, broadcast address, usable host range, and number of hosts for any IPv4 address in CIDR notation. Essential for network engineers, system administrators, and anyone configuring routers, firewalls, or cloud networking.
IP subnetting divides a large network into smaller, more manageable segments โ improving security, performance, and organization. Understanding CIDR notation and subnet calculations is a fundamental skill in networking, cloud computing (AWS VPCs, Azure VNets), and firewall configuration.
Formula
Hosts per subnet = 2^(32-prefix) - 2 | Subnet Mask: /24 = 255.255.255.0 | Network Address = IP AND Subnet Mask
IP Subnetting Guide
IPv4 addresses consist of 32 bits written as four octets (e.g., 192.168.1.0). The CIDR prefix (e.g., /24) defines how many bits are the network portion. The remaining bits define host addresses within that subnet. A /24 subnet has 24 network bits and 8 host bits = 2^8 - 2 = 254 usable host addresses.
Common Subnet Masks Reference
CIDR
Subnet Mask
Usable Hosts
Typical Use
/8
255.0.0.0
16,777,214
Class A โ Large enterprises
/16
255.255.0.0
65,534
Class B โ Medium networks
/24
255.255.255.0
254
Class C โ Small office/home
/25
255.255.255.128
126
Half a Class C
/26
255.255.255.192
62
Quarter Class C
/27
255.255.255.224
30
Small team segment
/28
255.255.255.240
14
Small device group
/30
255.255.255.252
2
Point-to-point links
/32
255.255.255.255
1 (host route)
Single host
Private IP Address Ranges
RFC 1918 defines three private IP ranges not routed on the internet: 10.0.0.0/8 (Class A, 16.7M addresses), 172.16.0.0/12 (Class B, 1M addresses), 192.168.0.0/16 (Class C, 65,536 addresses). Home routers typically use 192.168.1.0/24. Enterprise networks use 10.0.0.0/8. AWS VPCs support all three ranges.
Why -2 Hosts per Subnet?
Two addresses in every subnet are reserved: the network address (all host bits = 0) and the broadcast address (all host bits = 1). In a /24 subnet: 192.168.1.0 is the network address, 192.168.1.255 is broadcast, and 192.168.1.1 to 192.168.1.254 are the 254 usable host addresses.
Frequently Asked Questions
CIDR (Classless Inter-Domain Routing) notation expresses an IP address with its subnet prefix: 192.168.1.0/24. The /24 means 24 bits are the network portion, leaving 8 bits for hosts. This gives 2^8 - 2 = 254 usable host addresses.
A /24 subnet (255.255.255.0) supports 2^(32-24) - 2 = 256 - 2 = 254 usable host addresses. The first address is the network address (192.168.1.0) and the last is the broadcast address (192.168.1.255).
Network address: first address in the subnet with all host bits = 0 (e.g., 192.168.1.0). Used to identify the subnet itself. Broadcast address: last address with all host bits = 1 (e.g., 192.168.1.255). Packets sent here go to all hosts on the subnet.
For small offices (up to 254 devices): /24 (255.255.255.0). For very small teams (up to 30 devices): /27. For home networks: /24 is standard. For cloud VPCs, plan for growth โ a /20 gives 4,094 hosts for a growing AWS deployment.
Subnetting divides a network into segments for: security isolation (guest WiFi vs corporate), performance (smaller broadcast domains), IP address management (allocating ranges to departments), and routing efficiency. Cloud providers use subnets for VPC design across availability zones.
IPv4 uses 32-bit addresses with /0-/32 CIDR prefixes. IPv6 uses 128-bit addresses with /0-/128 prefixes. IPv6 standard allocation is /64 per subnet (18 quintillion host addresses per subnet). IPv6 subnetting follows the same CIDR logic but the vastly larger address space means shortage is not a concern.