Search tools...
Developer Tools

IP Subnet Calculator Guide: Calculate Subnets and CIDR Ranges (2026)

Calculate subnet masks, network addresses, broadcast addresses, and host ranges from any IP and CIDR notation — essential for network planning.

10 min readUpdated April 9, 2026Developer, Networking, IP, Calculator

An IP subnet calculator takes an IP address and subnet mask (or CIDR notation) and instantly calculates the network address, broadcast address, usable host range, and number of available hosts — saving you from manual binary arithmetic.

Whether you are designing a network, configuring VPCs in AWS, setting up firewall rules, or preparing for networking certifications (CCNA, CompTIA Network+), this tool does the subnet math for you. This guide covers subnetting fundamentals, CIDR notation, and practical examples.

Free Tool

Calculate IP Subnets Instantly

Enter an IP address and subnet mask to see network address, broadcast address, host range, and usable host count.

Open IP Subnet Calculator ->

Subnetting Basics

Subnetting divides a large network into smaller, manageable sub-networks. Every IP address has two parts:

  • Network portion — Identifies which network the device belongs to
  • Host portion — Identifies the specific device within that network

The subnet mask determines where the network portion ends and the host portion begins.

Example: 192.168.1.100/24

PropertyValue
IP Address192.168.1.100
Subnet Mask255.255.255.0 (/24)
Network Address192.168.1.0
Broadcast Address192.168.1.255
First Usable Host192.168.1.1
Last Usable Host192.168.1.254
Total Usable Hosts254
Why /24?

/24 means the first 24 bits are the network portion. That leaves 8 bits for hosts = 2^8 - 2 = 254 usable addresses (minus network and broadcast addresses).

CIDR Notation Explained

CIDR (Classless Inter-Domain Routing) notation uses a slash followed by the number of network bits:

CIDRSubnet MaskUsable HostsCommon Use
/32255.255.255.2551Single host (loopback, ACL)
/30255.255.255.2522Point-to-point link
/28255.255.255.24014Small office subnet
/24255.255.255.0254Standard LAN subnet
/20255.255.240.04,094Large office / VPC subnet
/16255.255.0.065,534VPC / campus network
/8255.0.0.016,777,214Class A network
Quick Formula

Usable hosts = 2^(32 - CIDR) - 2. For /24: 2^8 - 2 = 254. For /28: 2^4 - 2 = 14. The -2 accounts for network and broadcast addresses.

Subnetting for Cloud (AWS, Azure, GCP)

Cloud VPC networking uses subnetting extensively. Here is how to plan subnets for a typical Indian startup on AWS:

VPC Design Example

SubnetCIDRHostsPurpose
VPC10.0.0.0/1665,534Entire virtual network
Public Subnet (AZ-a)10.0.1.0/24254Load balancers, NAT gateways
Public Subnet (AZ-b)10.0.2.0/24254Redundant public resources
Private Subnet (AZ-a)10.0.10.0/24254Application servers
Private Subnet (AZ-b)10.0.11.0/24254Redundant app servers
Database Subnet (AZ-a)10.0.20.0/24254RDS, ElastiCache
Database Subnet (AZ-b)10.0.21.0/24254Redundant databases
AWS Reserves 5 IPs

In every AWS subnet, 5 IP addresses are reserved (network, broadcast, DNS, future use, VPC router). A /24 subnet gives 251 usable hosts, not 254.

Private IP Ranges (RFC 1918)

These IP ranges are reserved for private networks (not routed on the internet):

RangeCIDRTotal IPsCommon Use
10.0.0.0 - 10.255.255.25510.0.0.0/816.7 millionLarge enterprises, cloud VPCs
172.16.0.0 - 172.31.255.255172.16.0.0/121 millionMedium networks
192.168.0.0 - 192.168.255.255192.168.0.0/1665,534Home/office routers

Your home Wi-Fi router likely uses 192.168.0.0/24 or 192.168.1.0/24. Cloud VPCs typically use 10.0.0.0/16.

Subnetting for CCNA and Network+ Exams

Subnetting questions are guaranteed in CCNA and CompTIA Network+ exams. Here are the key skills to practice:

  • Convert CIDR to subnet mask — /26 = 255.255.255.192 (memorize the common ones)
  • Calculate usable hosts — 2^(32-CIDR) - 2
  • Find network address — AND the IP with the subnet mask
  • Find broadcast address — Set all host bits to 1
  • Determine if two IPs are in the same subnet — Both must have the same network address

Must-Memorize Subnet Table

CIDRMask (last octet)Block SizeHosts
/25128128126
/261926462
/272243230
/282401614
/2924886
/3025242
Exam Tip

Practice calculating subnets without a calculator. In the CCNA exam, you need to do this mentally or on scratch paper. Use this tool to verify your manual calculations while studying.

How to Use the Tool (Step by Step)

  1. 1

    Enter IP Address

    Type an IPv4 address like 192.168.1.100 or 10.0.0.0.

  2. 2

    Enter Subnet Mask or CIDR

    Enter the subnet mask (255.255.255.0) or CIDR prefix (/24).

  3. 3

    View Calculated Results

    See network address, broadcast address, first and last usable host, and total host count.

  4. 4

    Plan Your Network

    Use the results to plan subnets, configure routers, or set up cloud VPC networking.

Frequently Asked Questions

What is a subnet mask?+

A subnet mask determines which part of an IP address is the network portion and which is the host portion. For example, 255.255.255.0 (/24) means the first 24 bits identify the network and the last 8 bits identify hosts.

What is CIDR notation?+

CIDR uses a slash followed by the number of network bits — e.g., /24 means 24 network bits. It replaces the older classful addressing system (Class A/B/C) with flexible subnet sizes.

How many usable hosts in a /24 subnet?+

254 usable hosts. Formula: 2^(32-24) - 2 = 254. The -2 accounts for the network address (first) and broadcast address (last), which cannot be assigned to devices.

What is the difference between network and broadcast address?+

The network address (all host bits = 0) identifies the subnet itself. The broadcast address (all host bits = 1) sends packets to all devices in the subnet. Neither can be assigned to a host.

What are private IP ranges?+

10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are private ranges (RFC 1918). They are not routed on the internet and are used for internal networks, home routers, and cloud VPCs.

How do I subnet for AWS VPC?+

Start with a /16 VPC (e.g., 10.0.0.0/16). Create /24 subnets for each purpose (public, private, database) in each availability zone. AWS reserves 5 IPs per subnet.

Is this calculator useful for CCNA exam prep?+

Yes. Subnetting is a core CCNA topic. Use the calculator to verify your manual calculations while practicing. Memorize the /25 through /30 subnet table for the exam.

Is this subnet calculator free and private?+

Yes. All calculations happen in your browser. No IP addresses or network data is sent to any server.

Free — No Signup Required

Calculate IP Subnets Instantly

Enter an IP address and subnet mask to see network address, broadcast address, host range, and usable host count.

Open IP Subnet Calculator ->

Related Guides