Subnet Calculator
Calculate subnet mask, network address, broadcast, and host range.
Frequently Asked Questions
What is a subnet mask?
A subnet mask defines which portion of an IP address identifies the network and which identifies the host. For example, /24 (255.255.255.0) means the first 24 bits are the network part, leaving 8 bits for hosts — giving 2⁸ = 256 addresses, of which 254 are usable (subtract network and broadcast addresses).
How many usable hosts are in a subnet?
Usable hosts = 2^(32 − prefix length) − 2. The −2 removes the network address (all host bits = 0) and the broadcast address (all host bits = 1). Examples: /24 = 254 hosts, /25 = 126, /26 = 62, /27 = 30, /28 = 14, /30 = 2 (used for point-to-point links).
What does CIDR notation mean?
CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its network prefix length as a single string: 192.168.1.0/24. The "/24" means the first 24 bits are the network portion. This replaced the older classful system (Class A /8, Class B /16, Class C /24) with flexible subnet sizing.
What is the difference between private and public IP ranges?
Private IP ranges (RFC 1918) are reserved for internal networks and are not routable on the internet: 10.0.0.0/8 (Class A private), 172.16.0.0/12 (Class B private), 192.168.0.0/16 (Class C private). Your router's WAN IP is public; devices on your LAN get private addresses. NAT allows many private devices to share one public IP.