IP Subnet Calculator

Calculate subnet masks, network addresses, broadcast addresses, and available host ranges for IPv4 networks

Understanding IP Subnetting

IP subnetting is the process of dividing a larger network into smaller, more manageable sub-networks (subnets). Each subnet has its own range of IP addresses, enabling better network organization, improved security, and more efficient use of IP address space. Subnetting is a fundamental concept in networking defined by RFC 950 and later extended by RFC 1519 (CIDR).

Key Concepts

  • Network Address: The first address in a subnet, identifies the network itself. All host bits are set to 0.
  • Broadcast Address: The last address in a subnet, used to communicate with all hosts on that network. All host bits are set to 1.
  • Subnet Mask: A 32-bit number that separates the network portion from the host portion of an IP address.
  • CIDR Notation: A compact way to express an IP address and its associated subnet mask (e.g., 192.168.1.0/24).
  • Wildcard Mask: The inverse of the subnet mask, commonly used in access control lists (ACLs) on routers.
  • Usable Hosts: Total addresses minus 2 (network and broadcast addresses). For a /31 prefix, RFC 3021 allows 2 usable hosts.

Common Subnet Masks

CIDR Subnet Mask Total Addresses Usable Hosts
/8 255.0.0.0 16,777,216 16,777,214
/16 255.255.0.0 65,536 65,534
/24 255.255.255.0 256 254
/25 255.255.255.128 128 126
/26 255.255.255.192 64 62
/27 255.255.255.224 32 30
/28 255.255.255.240 16 14
/30 255.255.255.252 4 2

IPv4 Address Classes

IPv4 addresses were originally divided into five classes (A through E) based on the leading bits of the address. Although classful networking has been replaced by CIDR, understanding classes is still useful for identifying default masks and address ranges.

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

Private vs Public IP Addresses

Certain IP address ranges are reserved for private use within local networks and are not routable on the public internet. These ranges are defined in RFC 1918.

Class A Private

  • 10.0.0.0 - 10.255.255.255
  • Prefix: 10.0.0.0/8
  • 16,777,216 addresses
  • Large enterprise networks

Class B Private

  • 172.16.0.0 - 172.31.255.255
  • Prefix: 172.16.0.0/12
  • 1,048,576 addresses
  • Medium enterprise networks

Class C Private

  • 192.168.0.0 - 192.168.255.255
  • Prefix: 192.168.0.0/16
  • 65,536 addresses
  • Home and small office networks

Note: This calculator provides IPv4 subnet calculations for educational and network planning purposes. Always verify network configurations with your network administrator before making changes to production environments.

As an Amazon Associate, we earn from qualifying purchases.

Recommended Calculator

Casio FX-991ES Plus-2nd Edition Scientific Calculator

Casio FX-991ES Plus

The professional-grade scientific calculator with 417 functions, natural display, and solar power. Perfect for students and professionals.

View on Amazon