Skip to main content
CheckTown
Dev Tools

Subnet Calculator: IPv4 CIDR, Masks and Hosts Guide

Published 5 min read
In this article

What Is Subnetting?

Subnetting is the practice of dividing an IP network into smaller, more manageable segments called subnets. Each subnet has its own range of IP addresses, network address, and broadcast address. This is fundamental to network design, security, and efficient IP address allocation.

CIDR (Classless Inter-Domain Routing) notation like 192.168.1.0/24 expresses a subnet concisely — the IP address followed by the number of bits in the network mask. A subnet calculator converts this notation into all the details network engineers need.

How Subnet Calculation Works

The calculator takes a CIDR notation input and computes the full subnet details using binary arithmetic.

  • Network address — the first address in the range, found by applying the subnet mask with a bitwise AND
  • Broadcast address — the last address in the range, found by setting all host bits to 1
  • Host range — usable addresses between network and broadcast. A /24 has 254 usable hosts (256 total minus network and broadcast)

Try it free — no signup required

Calculate Subnet →

When To Use the Subnet Calculator

The subnet calculator is essential for network planning and troubleshooting.

  • Network planning — determine how many hosts a subnet can support and choose the right prefix length
  • Firewall rules — verify that IP ranges and CIDR blocks cover the correct addresses for access control lists
  • Cloud infrastructure — calculate VPC subnet ranges for AWS, Azure, or GCP network configuration

Frequently Asked Questions

What is the difference between /24 and /16?

A /24 network has a 24-bit mask (255.255.255.0) with 254 usable hosts. A /16 network has a 16-bit mask (255.255.0.0) with 65,534 usable hosts. Each bit removed from the prefix doubles the number of addresses. /24 is typical for a small office LAN, /16 for a larger campus network.

What are private IP ranges?

Private IP ranges defined in RFC 1918 are: 10.0.0.0/8 (10.x.x.x), 172.16.0.0/12 (172.16.x.x to 172.31.x.x), and 192.168.0.0/16 (192.168.x.x). These are used for internal networks and are not routable on the public internet. The calculator identifies whether an address falls in a private range.

What is a wildcard mask?

A wildcard mask is the inverse of a subnet mask — where the subnet mask has 1-bits, the wildcard has 0-bits and vice versa. For example, subnet mask 255.255.255.0 becomes wildcard 0.0.0.255. Wildcard masks are used in Cisco ACLs and OSPF configurations to specify which bits of an address to match.

Related Tools