IP Subnet Calculator

Calculate subnet masks, network addresses, broadcast addresses, and more. Essential tool for network administrators, engineers, and students.

Subnet Calculation: Enter an IP address and subnet mask (in CIDR notation or dotted decimal) to calculate network information.

Enter a valid IPv4 address (0.0.0.0 to 255.255.255.255)
192.168.1.1
10.0.0.1
172.16.0.1
8.8.8.8
Enter as CIDR notation (e.g., /24) or dotted decimal (e.g., 255.255.255.0)
/24 (255.255.255.0)
/16 (255.255.0.0)
/8 (255.0.0.0)
/28 (255.255.255.240)

Calculate subnet division for VLSM
Calculate subnet mask based on host requirements

Understanding IP Subnetting

Subnetting is the process of dividing a network into smaller network sections, or subnets. It's used to improve network performance, security, and management.

Key Concepts:

  • Network Address: The first address in a subnet, used to identify the subnet itself
  • Broadcast Address: The last address in a subnet, used to send data to all devices in the subnet
  • Host Range: All addresses between the network and broadcast addresses that can be assigned to devices
  • CIDR Notation: A compact representation of an IP address and its subnet mask (e.g., 192.168.1.0/24)

IP Address Classes

Class Range Default Subnet Mask CIDR Notation Purpose
Class A 1.0.0.0 - 126.255.255.255 255.0.0.0 /8 Large networks
Class B 128.0.0.0 - 191.255.255.255 255.255.0.0 /16 Medium networks
Class C 192.0.0.0 - 223.255.255.255 255.255.255.0 /24 Small networks
Class D 224.0.0.0 - 239.255.255.255 N/A N/A Multicasting
Class E 240.0.0.0 - 255.255.255.255 N/A N/A Experimental

Private IP Address Ranges

Class Private Range CIDR Usable Addresses
Class A 10.0.0.0 - 10.255.255.255 10.0.0.0/8 16,777,214
Class B 172.16.0.0 - 172.31.255.255 172.16.0.0/12 1,048,574
Class C 192.168.0.0 - 192.168.255.255 192.168.0.0/16 65,534

Common Subnet Masks

CIDR Subnet Mask Wildcard Mask Hosts per Subnet
/30 255.255.255.252 0.0.0.3 2
/29 255.255.255.248 0.0.0.7 6
/28 255.255.255.240 0.0.0.15 14
/27 255.255.255.224 0.0.0.31 30
/26 255.255.255.192 0.0.0.63 62
/25 255.255.255.128 0.0.0.127 126
/24 255.255.255.0 0.0.0.255 254
/23 255.255.254.0 0.0.1.255 510
/22 255.255.252.0 0.0.3.255 1,022
/21 255.255.248.0 0.0.7.255 2,046

Frequently Asked Questions

CIDR (Classless Inter-Domain Routing) notation is a compact representation of an IP address and its associated network mask. For example, /24 represents a subnet mask of 255.255.255.0. The number after the slash indicates the number of network bits in the mask.

The network address identifies the subnet itself, and the broadcast address is used to send data to all devices in the subnet. These addresses have special functions and cannot be assigned to individual hosts. Only addresses in between (the host range) can be assigned to devices.

VLSM (Variable Length Subnet Masking) allows different subnets within the same network to have different subnet masks. Traditional subnetting uses the same subnet mask for all subnets. VLSM is more efficient as it allows for better allocation of IP addresses based on the actual number of hosts needed in each subnet.

The formula is: 2(32 - CIDR) - 2. For example, for a /24 network: 2(32-24) - 2 = 28 - 2 = 256 - 2 = 254 usable hosts. The "-2" accounts for the network and broadcast addresses.

Private IP addresses (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) are not routable on the public Internet. They should be used for internal networks behind a NAT router or firewall. This conserves public IP addresses and adds a layer of security.