IP Subnet Calculator

Calculate network address, broadcast IP, host range, and subnet mask from any CIDR notation.

Free Runs in your browser

How to use

  1. 1 Enter an IP address in CIDR notation (e.g. 192.168.1.0/24) into the input field.
  2. 2 Click Calculate and the tool computes the network address, broadcast address, subnet mask, and usable host range.
  3. 3 Check the number of usable host addresses for your subnet prefix.
  4. 4 Use the results to plan your network topology or configure firewall rules.

Key features

  • Calculates network address, broadcast, subnet mask, and usable host range
  • Supports all CIDR prefixes from /0 to /32
  • Shows the number of usable host addresses
  • Useful for network planning, firewall rules, and cloud VPC configuration

What is CIDR Notation?

CIDR (Classless Inter-Domain Routing) is the compact way to describe an IP network. 192.168.0.0/24 means "192.168.0.x, all 256 addresses where the first 24 bits are fixed." The number after the slash is the prefix length: the higher it is, the smaller the network.

CIDR replaced the old Class A/B/C system in 1993 (RFC 1519), enabling more efficient use of the IPv4 address space. Every cloud platform: AWS VPCs, GCP subnets, Azure VNets, uses CIDR notation to define network boundaries.

Common Use Cases

Cloud VPC and subnet design

Calculate available host ranges before creating subnets in AWS, GCP, or Azure to avoid overlap.

Firewall rules and allowlists

Verify that a CIDR block covers the right range of IPs before adding it to a security group or firewall.

Office network planning

Determine how many usable host addresses fit in a planned subnet before allocating address space.

VPN split tunneling config

Calculate the exact network address and mask needed for routing table entries in a VPN client.

Networking study and practice

Check your manual subnetting calculations against this tool while studying for CCNA or CompTIA Network+.

Zero Trust access policies

Verify that IP-based access conditions in IAM policies reference the correct CIDR blocks.

Common Subnet Sizes

The prefix lengths you'll encounter most in cloud and on-premises networking.

CIDRUsable hostsTypical use
/321Single host firewall rule
/302Point-to-point link
/2814Small subnet — 11 usable in an AWS VPC
/24254Standard LAN, office network
/1665,534AWS/GCP VPC default (10.0.0.0/16)
/816,777,214Large private network (10.x.x.x)

These counts assume plain IP networking, where only the network and broadcast addresses are removed. Inside a cloud VPC the arithmetic changes — AWS and Azure take five addresses per subnet, Google Cloud takes four. See the next section.

Cloud Subnets: AWS, Azure and Google Cloud

The most common reason a cloud subnet holds fewer hosts than the maths says.

In an AWS VPC, the first four addresses and the last address of every subnet CIDR block are reserved and cannot be assigned to anything — five in total, so a subnet's usable address count is total − 5 rather than total − 2. For the subnet 10.0.0.0/24:

AddressReserved for
10.0.0.0Network address
10.0.0.1The VPC router
10.0.0.2The DNS server (the base of the subnet range plus two)
10.0.0.3Future use by AWS
10.0.0.255Network broadcast address — AWS does not support broadcast in a VPC

Two consequences worth knowing before you size a subnet:

  • The usable count you get here is the generic one. This calculator subtracts the network and broadcast addresses only, so it reports 14 usable hosts for a /28. The same subnet in an AWS VPC has 11: 16 addresses minus the five AWS reserves.
  • AWS only accepts subnet sizes from /28 to /16. A /30 point-to-point link or a /32 host route is valid IP addressing but not a valid VPC subnet. The smallest subnet you can create holds 11 usable addresses, and the /16 ceiling is 65,531 rather than 65,534.

Azure reserves the same five (the first four addresses and the last), so a /24 is 251 usable there too. Its smallest subnet is a /29, which leaves 3 usable addresses. Google Cloud is the odd one out: it reserves four addresses in a subnet's primary range — the first (network), the second (the default gateway), the second-to-last and the last (broadcast) — so the formula is total − 4 and a /24 has 252 usable. Secondary ranges in Google Cloud, the ones used for GKE pods and services, reserve nothing.

SubnetPlain IPAWS / AzureGoogle Cloud
/24254251252
/26625960
/28141112

In AWS the five-address rule also applies to IPv6 subnets (the first four and the last of the block, negligible inside a /64). The exception runs the other way with BYOIP: if you bring your own IPv4 range to AWS, you can use every address in it, including the first and the last.

Frequently Asked Questions

How do I calculate a subnet from an IP and CIDR?

Enter an IP address followed by a forward slash and the prefix length (e.g. 192.168.1.0/24). The calculator will show you the network address, broadcast address, subnet mask, usable host range, and total number of hosts. The prefix length tells you how many bits are fixed: /24 means the first 24 bits are the network portion, leaving 8 bits for hosts.

What does /24 mean in IP addressing?

/24 is a CIDR prefix length indicating that the first 24 bits of the IP address are the network portion, leaving 8 bits (256 addresses) for hosts. A /24 subnet has 254 usable host addresses (256 minus network and broadcast addresses). It's the most common subnet size in office networks and corresponds to the subnet mask 255.255.255.0.

How many usable hosts are in a /28 subnet?

A /28 subnet has 16 total addresses (32 bits − 28 = 4 bits → 2⁴ = 16). After subtracting the network address (first) and broadcast address (last), you get 14 usable hosts. In an AWS VPC the same subnet has 11, because AWS reserves five addresses rather than two: 16 − 5 = 11.

How many usable IP addresses does an AWS subnet have?

Five fewer than the generic count. AWS reserves the first four addresses and the last address of every subnet CIDR block — the network address, the VPC router (.1), the DNS server (.2), one address for future use (.3) and the broadcast address. So the formula is total − 5: a /24 has 251 usable, a /26 has 59 and a /28 has 11. AWS accepts subnet sizes from /28 to /16, so 11 is the smallest subnet you can create.

What's the difference between network address and broadcast address?

The network address (first address in the range) identifies the subnet itself and cannot be assigned to a host. The broadcast address (last address in the range) is used to send packets to all hosts in the subnet simultaneously. For example, in 192.168.1.0/24, the network address is 192.168.1.0 and the broadcast address is 192.168.1.255.

How do I find my subnet mask?

On Windows, run ipconfig and look for "Subnet Mask". On macOS/Linux, run ifconfig or ip addr and look for netmask. You can also enter your IP and CIDR notation into this calculator: it will display the subnet mask in dotted decimal format (e.g. 255.255.255.0 for /24).