What This Tool Does
This subnet calculator takes an IP address with a CIDR prefix length or subnet mask and returns the full network breakdown, including network and broadcast addresses, usable host range, wildcard mask, and total host count. Everything runs in your browser with no server requests.
How to Use This Tool
- Enter an IP address in the input field, such as 192.168.1.50.
- Set the CIDR prefix length using the dropdown or type a subnet mask directly.
- The results update automatically showing network address, broadcast address, host range, subnet mask, wildcard mask, and total usable hosts.
- Click any value to copy it to your clipboard.
In-Depth Guide
Subnetting is one of the core skills in network administration, but doing the math by hand is tedious and error-prone. Even experienced engineers reach for a subnet calculator when planning address space, troubleshooting routing issues, or verifying firewall rules. The goal is always the same: given an IP address and a prefix length, determine exactly which addresses belong to the network, where the usable range starts and ends, and how large the subnet is.
An IPv4 address is a 32-bit number, typically written as four octets in dotted-decimal notation. The CIDR prefix length specifies how many of those 32 bits represent the network portion. The remaining bits identify individual hosts within that network. A /24 prefix, for example, reserves the first 24 bits for the network, leaving 8 bits for hosts, which gives 254 usable addresses after subtracting the network and broadcast addresses. A /16 leaves 16 bits for hosts, allowing 65,534 usable addresses. The relationship between prefix length and available hosts is exponential, which is why small changes in the prefix matter a great deal.
The subnet mask is the dotted-decimal representation of the prefix. A /24 corresponds to 255.255.255.0, a /16 to 255.255.0.0, and so on. The wildcard mask is simply the bitwise inverse, often used in access control lists on network equipment. Understanding both representations is useful because different vendors and protocols prefer different formats.
The network address is the lowest address in the range, with all host bits set to zero. The broadcast address is the highest, with all host bits set to one. Neither is available for assignment to a device. The usable host range falls between these two, starting one above the network address and ending one below the broadcast address. For very small subnets like /31 and /32, special rules apply. A /31 is a point-to-point link with two addresses and no broadcast, while a /32 identifies a single host.
Planning subnets carefully avoids waste and reduces the attack surface. Overallocating a /16 where a /24 would suffice exposes thousands of unused addresses that complicate monitoring and access control. Underallocating leads to renumbering pain when the network grows. A subnet calculator helps test different prefix lengths quickly so you can find the smallest block that comfortably fits your needs.
This tool is also useful for verifying existing configurations. If a device is assigned an address that falls outside the expected subnet, connectivity will break in ways that are sometimes difficult to diagnose. Pasting the address and prefix into a calculator immediately shows whether the address belongs to the intended network or not. The same check helps when reading firewall rules, route tables, or DHCP scopes that someone else configured.
For anyone studying for a networking certification, repetitive practice with subnetting is unavoidable. A calculator does not replace that practice, but it provides an instant reference to check your work. Once you are confident in the concepts, the calculator becomes a time-saver rather than a crutch, the same way a developer who understands algorithms still uses a debugger.
Frequently Asked Questions
What is a CIDR prefix length?
It is the number of leading bits in the IP address that define the network portion. A /24 means the first 24 of 32 bits are the network, leaving 8 bits for host addresses.
What is the difference between subnet mask and wildcard mask?
The subnet mask marks the network bits with ones and host bits with zeros. The wildcard mask is the inverse, with zeros for network bits and ones for host bits. Some systems, especially Cisco ACLs, use the wildcard mask instead of the subnet mask.
Why are the network and broadcast addresses not usable?
The network address, with all host bits zero, identifies the network itself. The broadcast address, with all host bits one, is used to send traffic to every host on the subnet. Neither can be assigned to a device.
Does this tool support IPv6?
This version handles IPv4 only. IPv6 subnetting follows the same prefix concept but uses 128-bit addresses with different notation.
Does this tool send data to a server?
No. All calculations happen locally in your browser. No network requests are made.