Calculate Logo
Calculate

Subnet Calculator

Calculate network range, netmask, and usable hosts from IP and CIDR.

Network engineering relies on precision. Subnetting—the practice of dividing a network into smaller, efficient sub-networks—is a fundamental skill for IT professionals. Our Subnet Calculator takes an IP address and CIDR block to instantly calculate the network range, broadcast address, netmask, and the number of usable hosts. It is an essential tool for setting up routers, configuring firewalls, and assigning static IPs.

Network Definition

Enter IP to see details
Advertisement

Frequently Asked Questions

Networking Basics

Subnetting is the practice of dividing a network into two or more smaller networks. It increases routing efficiency, enhances security, and reduces broadcast domain size (preventing network traffic "storms").

1. Understanding CIDR

CIDR (Classless Inter-Domain Routing) notation (e.g., /24) tells you how many bits are used for the Network portion of the address versus the Host portion.

  • /24 means the first 24 bits are fixed. (Like `192.168.1.xxx` - typically for home networks, supporting 254 hosts).
  • /16 means the first 16 bits are fixed. (Like `192.168.xxx.xxx` - supporting 65,534 hosts).
  • /8 means the first 8 bits are fixed. (Like `10.xxx.xxx.xxx` - supporting 16+ million hosts).

2. Reserved Private Ranges (RFC 1918)

Devices on these networks are not directly accessible from the public internet, adding a layer of security (NAT).

  • 10.0.0.0 – 10.255.255.255 (Large networks, often enterprise)
  • 172.16.0.0 – 172.31.255.255 (Medium networks, AWS/Docker defaults)
  • 192.168.0.0 – 192.168.255.255 (Small home routers)

3. The Binary Logic Explained

Computers don't see IP addresses as numbers like 192.168.1.1. They see 32 bits of ones and zeros.

192.168.1.1 = 11000000.10101000.00000001.00000001
/24 Mask = 11111111.11111111.11111111.00000000

The "Mask" literally masks off the Network part. Where the mask has a 1, the address is locked (Network). Where it has a 0, the address is flexible (Host).

4. CIDR Cheat Sheet

CIDRSubnet MaskUsable Hosts
/32255.255.255.2551
/30255.255.255.2522
/24255.255.255.0254
/16255.255.0.065,534
/8255.0.0.016M+

5. Frequently Asked Questions (FAQ)

Q: Why minus 2 hosts?

In every subnet, the very first IP is the "Network Address" (identifies the subnet itself) and the very last IP is the "Broadcast Address" (messages sent here go to everyone). Neither can be assigned to a specific device.