Subnet Calculator

Free CIDR calculator and subnet calculator online. Compute subnet mask, wildcard mask, network/broadcast address, usable IP range, and host count from any CIDR notation.

Run a check to see results

APIPOST /api/v1/network/subnet
5(14 votes)
10
checks performed
Try also: IP Geolocation
Run Check

Key Features

100% Free

No registration required, unlimited checks

Instant Results

Real-time analysis with detailed output

REST API Access

Integrate into your workflow via API

Accurate Data

Live queries to authoritative sources

What is Subnet Calculator?

The subnet calculator instantly computes all network details from CIDR notation or an IP address with subnet mask. Enter any CIDR like 192.168.1.0/24 and the tool calculates the subnet mask (in dotted decimal, binary, and hex), wildcard mask (used in access control lists), network address, broadcast address, usable IP range (first and last assignable host), total number of usable hosts, and the IP class. This free online CIDR calculator is an everyday tool for network engineers designing and segmenting networks, system administrators configuring firewall rules and ACLs, DevOps engineers setting up VPC subnets in cloud environments like AWS, Azure, or Google Cloud, students learning IP subnetting concepts, and anyone planning IP address allocation for offices, data centers, or home labs.

The tool handles all prefix lengths from /0 (entire internet) to /32 (single host), making it useful for both large-scale network planning and precise host-level configurations.

How to Use

  1. 1Enter an IP address with CIDR notation (e.g., 192.168.1.0/24 or 10.0.0.0/16)
  2. 2Click 'Run Check' to compute all subnet details instantly
  3. 3Review the key outputs: subnet mask, network address, broadcast address, and usable IP range
  4. 4Check the total number of usable hosts — this is the capacity of the subnet minus network and broadcast addresses
  5. 5Use the wildcard mask value if you need it for router ACL or firewall rule configuration

Who Uses This

System Administrators

Monitor and troubleshoot infrastructure

Developers

Debug network issues and integrate via API

SEO Specialists

Verify domain configuration and performance

Security Analysts

Audit and assess network security

Frequently Asked Questions

What is CIDR notation and how does it work?
CIDR (Classless Inter-Domain Routing) notation represents an IP address and its associated network mask as a single compact value, like 192.168.1.0/24. The number after the slash is the prefix length — it indicates how many of the 32 bits in an IPv4 address are used for the network portion. For example, /24 means the first 24 bits identify the network and the remaining 8 bits identify hosts within that network, giving 256 total addresses (254 usable hosts). A /16 gives 65,536 addresses, while /32 represents a single specific IP address. CIDR replaced the old classful addressing system (Class A/B/C) to allow more flexible network sizing.
How do I calculate a subnet mask from CIDR?
Enter the IP address with CIDR prefix length (e.g., 10.0.0.0/16) and the calculator does the math automatically. Manually, the subnet mask is created by setting the first N bits to 1 and the rest to 0, where N is the prefix length. For /24: 11111111.11111111.11111111.00000000 = 255.255.255.0. For /16: 11111111.11111111.00000000.00000000 = 255.255.0.0. Common prefix lengths: /8 (255.0.0.0, 16M hosts), /16 (255.255.0.0, 65K hosts), /24 (255.255.255.0, 254 hosts), /30 (255.255.255.252, 2 hosts — used for point-to-point links).
What is the difference between network address and broadcast address?
The network address is the first IP in a subnet — it identifies the network itself and cannot be assigned to any device. The broadcast address is the last IP in the subnet — packets sent to this address are delivered to all hosts on that subnet. For example, in the 192.168.1.0/24 network: 192.168.1.0 is the network address, 192.168.1.255 is the broadcast address, and 192.168.1.1 through 192.168.1.254 are the 254 usable host addresses. This is why a /24 subnet has 256 total IPs but only 254 usable ones.
What is a wildcard mask and when is it used?
A wildcard mask is the inverse of a subnet mask — where the subnet mask has 1s, the wildcard has 0s, and vice versa. For a /24 subnet with mask 255.255.255.0, the wildcard is 0.0.0.255. Wildcard masks are primarily used in Cisco router and switch configurations for access control lists (ACLs) and OSPF routing protocol configurations. While a subnet mask defines the network boundary, a wildcard mask defines which bits of an IP address should be matched in filtering rules.
How many usable hosts does a /24 subnet have?
A /24 subnet has 256 total IP addresses but only 254 usable host addresses, because the first address (network address) and the last address (broadcast address) are reserved. The formula is: usable hosts = 2^(32 - prefix length) - 2. Common examples: /30 = 2 usable hosts (point-to-point links), /28 = 14 hosts, /27 = 30 hosts, /26 = 62 hosts, /25 = 126 hosts, /24 = 254 hosts, /23 = 510 hosts, /22 = 1,022 hosts, /16 = 65,534 hosts.