Home/Tools/Subnet Calculator

Subnet Calculator

Calculate IP address ranges, subnet masks, and network details from CIDR notation. Free online tool for network planning and design.

Ethical Use Notice

This tool is provided for educational, defensive security, and authorized testing purposes only. Unauthorized access to computer systems, networks, or data is illegal. Always obtain proper authorization before conducting security assessments or testing. Use this tool responsibly and in compliance with all applicable laws and regulations.

/

Quick CIDR Reference

CIDRSubnet MaskTotal HostsDescription
/32255.255.255.2551Single host
/31255.255.255.2542Point-to-point
/30255.255.255.2524Point-to-point links
/29255.255.255.2488Small subnet
/28255.255.255.24016Very small network
/27255.255.255.22432Small network
/26255.255.255.19264Small network
/25255.255.255.128128Medium network
/24255.255.255.0256Class C
/16255.255.0.065,536Class B
/8255.0.0.016,777,216Class A

Click any row to use that CIDR value

Key Features

🌐

Instant Calculations

Real-time subnet calculations as you type. Instantly see network addresses, broadcast addresses, and usable IP ranges.

📊

Complete Network Details

View subnet masks, wildcard masks, CIDR notation, IP classes, total hosts, usable hosts, and binary representations.

📋

One-Click Copy

Easily copy any calculated value to your clipboard with a single click for quick use in network configurations.

🔍

IP Type Detection

Automatically identifies private, public, loopback, and link-local IP addresses based on RFC standards.

📚

CIDR Reference Table

Quick reference guide for common CIDR notations with subnet masks and host counts. Click any row to use it.

💻

Binary Conversion

View subnet masks in binary format to understand how network and host bits are divided at the bit level.

Understanding Subnetting

Subnetting is the practice of dividing a network into smaller, more manageable subnetworks. It improves network performance, enhances security, and makes IP address allocation more efficient.

Why Subnet?

  • • Reduces broadcast traffic and network congestion
  • • Improves network security through segmentation
  • • Enables efficient IP address allocation
  • • Organizes networks by department, location, or function
  • • Simplifies network management and troubleshooting

Common Use Cases

  • • Enterprise network design and planning
  • • Data center IP allocation
  • • Cloud infrastructure configuration (AWS, Azure, GCP)
  • • Point-to-point router links
  • • VPN and remote access networks

CIDR Notation Explained

CIDR (Classless Inter-Domain Routing) notation provides a flexible method for allocating IP addresses and routing IP packets, replacing the older classful network design.

How CIDR Works

1️⃣
Format: IP Address/Prefix Length

Example: 192.168.1.0/24 means the first 24 bits identify the network

2️⃣
Network Bits vs Host Bits

Higher prefix = more network bits = smaller subnet = fewer hosts

3️⃣
Calculating Hosts

Usable hosts = 2^(32-prefix) - 2 (subtract network and broadcast addresses)

Example Breakdown

For 192.168.1.0/24:

  • • Network Address: 192.168.1.0
  • • Broadcast Address: 192.168.1.255
  • • Usable IP Range: 192.168.1.1 - 192.168.1.254
  • • Total Hosts: 256 (2^8)
  • • Usable Hosts: 254 (256 - 2)
  • • Subnet Mask: 255.255.255.0

Private vs Public IP Addresses

Understanding the difference between private and public IP addresses is essential for network design and security planning.

Private IP Ranges (RFC 1918)

Class A: 10.0.0.0/8

10.0.0.0 - 10.255.255.255 (16,777,216 addresses)

Class B: 172.16.0.0/12

172.16.0.0 - 172.31.255.255 (1,048,576 addresses)

Class C: 192.168.0.0/16

192.168.0.0 - 192.168.255.255 (65,536 addresses)

Use Cases:

  • • Home networks
  • • Corporate LANs
  • • Internal servers and devices
  • • Behind NAT/firewall

Public IP Addresses

Globally Unique

Assigned by Regional Internet Registries (RIRs)

Internet Routable

Can be reached directly from the public internet

Limited Availability

IPv4 addresses are exhausted, requiring careful management

Use Cases:

  • • Web servers
  • • Email servers
  • • Public-facing services
  • • VPN endpoints

Special-Use IP Addresses

127.0.0.0/8 - Loopback

Used for local testing (127.0.0.1 = localhost)

169.254.0.0/16 - Link-Local

APIPA addresses when DHCP fails

224.0.0.0/4 - Multicast

Class D addresses for multicast groups

0.0.0.0/8 - This Network

Current network (used in routing)

Frequently Asked Questions

Find answers to common questions

CIDR (Classless Inter-Domain Routing) notation is a compact way to represent IP addresses and their routing prefix. It uses a slash (/) followed by a number (0-32) to indicate how many bits are used for the network portion. For example, 192.168.1.0/24 means the first 24 bits identify the network, leaving 8 bits for host addresses (256 total addresses).

Need Help with Network Design?

Our network engineers can help you design and implement secure, scalable network infrastructure for your organization. From subnet planning to enterprise network architecture.