Subnet Calculator
Enter an IPv4 address with CIDR notation to calculate all subnet details. Pure client-side — no data is sent to any server.
What is Subnetting?
Subnetting is the practice of dividing a single IP network into smaller, logical sub-networks (subnets). This technique is fundamental to how the modern internet and private networks are organized. Subnetting allows network administrators to improve security (by isolating different network segments), improve performance (by reducing broadcast domain size), and make more efficient use of the limited IPv4 address space.
CIDR Notation Explained
CIDR (Classless Inter-Domain Routing) notation represents an IP address and its associated network prefix length. It's written as an IP address followed by a slash and a number, like 192.168.1.0/24. The number after the slash (the prefix length) indicates how many bits of the 32-bit IP address are the "network" portion — the remaining bits identify individual hosts within that network.
A /24 prefix means 24 bits are fixed (the network), leaving 8 bits for hosts (2^8 = 256 addresses, 254 usable). A /16 leaves 16 bits for hosts (65,536 addresses, 65,534 usable).
Key Subnet Concepts
- Network Address — The first address in the subnet, where all host bits are set to 0. This address identifies the network itself and cannot be assigned to a host.
- Broadcast Address — The last address in the subnet, where all host bits are set to 1. Packets sent to the broadcast address reach all hosts in the subnet. It cannot be assigned to an individual host.
- Subnet Mask — A 32-bit number with all network bits set to 1 and all host bits set to 0 (e.g.,
255.255.255.0for/24). Used in bitwise AND operations to determine which subnet an IP belongs to. - Wildcard Mask — The inverse of the subnet mask. Used in access control lists (ACLs) and firewall rules to match ranges of IP addresses. For a
/24subnet, the wildcard mask is0.0.0.255. - Usable Hosts — The total number of IP addresses in the subnet minus 2 (network address and broadcast address). For a
/24, that's 256 - 2 = 254 usable hosts.
Private IP Ranges (RFC 1918)
10.0.0.0/8— 16,777,216 addresses (Class A private)172.16.0.0/12— 1,048,576 addresses (Class B private)192.168.0.0/16— 65,536 addresses (Class C private)
These ranges are reserved for private networks and are not routable on the public internet. They're used in homes, offices, and data centers for internal networking.
Common Subnet Sizes
- /30 — 4 IPs, 2 usable. Used for point-to-point links between routers.
- /29 — 8 IPs, 6 usable. Small subnets for a handful of devices.
- /28 — 16 IPs, 14 usable. Small office or VLAN segment.
- /24 — 256 IPs, 254 usable. The most common subnet size for small networks.
- /22 — 1,024 IPs, 1,022 usable. Medium-sized network.
- /16 — 65,536 IPs, 65,534 usable. Large corporate network.
- /8 — 16,777,216 IPs. Entire class A block — used by large ISPs and governments.
VLSM (Variable Length Subnet Masking)
VLSM allows you to use different subnet mask lengths within the same network, allocating address space more efficiently. Instead of giving every subnet the same /24 block, you can give a large department a /22, a medium department a /25, and a point-to-point link a /30. This calculator helps you understand the boundaries of each subnet so you can plan your addressing scheme accordingly.