Subnet Calculator
Calculate network details, IP ranges, and subnet masks effortlessly. essential for network planning.
Understanding Subnets
Subnetting is the practice of dividing a single IP network into two or more smaller networks (subnets). Every IPv4 address has two parts: a network portion and a host portion, and the subnet mask (or its CIDR shorthand, like /24) is what tells routers and devices exactly where that split falls. Change the mask, and you change how many addresses belong to the network versus how many are left for individual hosts. Learn more about CIDR and subnetting in our guide.
Networks are subnetted for three practical reasons: to control broadcast traffic (every device on a subnet shares one broadcast domain, so smaller subnets mean less noise), to apply different security policies to different groups of devices (e.g. isolating IoT devices, guest Wi-Fi, or a DMZ from the internal LAN), and to avoid wasting address space — allocating a full /24 (254 usable hosts) to a point-to-point link that only ever needs 2 addresses is a common, avoidable mistake this calculator helps catch. Variable Length Subnet Masking (VLSM) — using different mask sizes for different subnets within the same network — is the standard technique for right-sizing each subnet to its actual host count instead of using one mask everywhere.
CIDR Notation
Classless Inter-Domain Routing (CIDR) is a method for allocating IP addresses and IP routing. It replaces the older classful network design.
Network & Broadcast
The first IP address in a subnet is the Network Address, and the last is the Broadcast Address. These cannot be assigned to hosts.
Subnet Mask
A 32-bit number that masks an IP address, and divides the IP address into network address and host address.
How to Use This Subnet Calculator
Enter any IPv4 address and pick a CIDR prefix (the number after the slash, from /1 to /32) to instantly see the network address, broadcast address, usable host range, subnet mask in both dotted-decimal and binary, and the wildcard mask used in access-control-list configurations. A smaller CIDR number (e.g. /16) covers more addresses; a larger one (e.g. /28) covers fewer — the calculator updates every field live as you change either input, so you can quickly compare how different mask sizes carve up the same address space.
Frequently Asked Questions
Why can't I assign the network or broadcast address to a device?
The network address (all host bits set to 0) identifies the subnet itself, and the broadcast address (all host bits set to 1) is used to send a message to every device on that subnet simultaneously. Both are reserved by the protocol, which is why usable hosts is always 2 less than total hosts for any subnet with a /31 or larger host portion.
What's the difference between a /24 and a /25?
A /24 has 8 host bits (256 total addresses, 254 usable) — a /25 has only 7 host bits (128 total addresses, 126 usable), because it borrows one more bit for the network portion. Each additional bit in the prefix halves the number of addresses in the subnet.
What is a wildcard mask used for?
A wildcard mask is the inverse of a subnet mask (each byte is 255 minus the subnet mask's byte) and is used in Cisco access control lists (ACLs) and OSPF configuration, where you specify which bits must match rather than which network a host belongs to.
Can I use this for IPv6 subnetting?
This calculator is IPv4-specific. IPv6 subnetting works on the same network/host-bit principle but with 128-bit addresses and typically /64 host segments — the math differs enough that it needs its own dedicated tool.
