Subnet Calculator — Free 2026
Enter an IPv4 address and CIDR prefix to instantly calculate network details, host range and subnet mask.
Subnet Details
Binary Representation
How It Works
- Enter an IP address
- Set the CIDR prefix
- Read the results
Understanding IP Subnetting
Subnetting is one of the fundamental concepts in networking. It allows network administrators to divide a single IP address range into smaller, isolated segments called subnets. Each subnet operates as an independent network, which improves security by limiting broadcast traffic and enabling access control between segments. Understanding subnetting is essential for anyone working with network infrastructure, from small office setups to enterprise data centers.
How CIDR Notation Works
Before CIDR was introduced in 1993, IP addresses were divided into rigid classes (A, B, C) that wasted vast numbers of addresses. CIDR replaced this with a flexible prefix-length system. The notation 192.168.1.0/24 means the first 24 bits identify the network and the remaining 8 bits identify hosts within that network. This gives 256 total addresses (2^8), of which 254 are usable for devices. Shorter prefixes like /16 create larger networks (65,536 addresses), while longer prefixes like /30 create tiny point-to-point links with just 2 usable hosts.
Subnet Masks Explained
A subnet mask is a 32-bit number that separates the network portion from the host portion of an IP address. For a /24 network, the mask is 255.255.255.0 — meaning the first three octets are all 1s in binary (network) and the last octet is all 0s (hosts). The wildcard mask is the bitwise inverse of the subnet mask and is used in Cisco router configurations for access control lists (ACLs) and OSPF area definitions.
Common Subnet Sizes
| CIDR | Mask | Usable Hosts | Use Case |
|---|---|---|---|
| /30 | 255.255.255.252 | 2 | Point-to-point link |
| /28 | 255.255.255.240 | 14 | Small office |
| /24 | 255.255.255.0 | 254 | Standard LAN |
| /16 | 255.255.0.0 | 65,534 | Large campus |
For testing network-related regular expressions such as IP address patterns, try our regex tester. If you need to generate secure credentials for network devices, use the password generator.
Comments