Calculator Tabs

IP Subnet Calculator

Every device on a network needs to know two things about its own address: which part identifies the network itself, and which part identifies the specific device within that network. This calculator takes an IPv4 address and a CIDR prefix and breaks out every value a network administrator actually needs — subnet mask, network and broadcast addresses, the usable host range, and how many devices that subnet can actually hold.

How the IP Subnet Calculator Works

Enter an IPv4 address and a CIDR prefix (the number after the slash, like /24), and the calculator converts the address into its underlying 32-bit binary representation, applies the prefix to determine which bits belong to the network portion versus the host portion, and derives every other value — subnet mask, wildcard mask, network address, broadcast address, first and last usable host, and total address count — directly from that binary split.

CIDR Notation: What the Number After the Slash Actually Means

The CIDR prefix (like the 24 in 192.168.1.0/24) specifies how many of the address’s 32 bits are fixed as the network portion, with the remaining bits available for host addresses within that network. A /24 network fixes the first 24 bits, leaving 8 bits (256 possible values) for hosts — which is exactly why a /24 is the most commonly recognized subnet size, corresponding to the familiar “255.255.255.0” subnet mask and 254 usable host addresses. A smaller prefix number (like /16) leaves more bits for hosts, creating a much larger network; a larger prefix number (like /28) leaves fewer bits, creating a much smaller network with fewer available addresses.

Network Address and Broadcast Address: The Two Addresses You Can’t Assign to a Device

Within any standard subnet, the very first address (with all host bits set to 0) is reserved as the network address, identifying the subnet itself rather than any individual device, and the very last address (with all host bits set to 1) is reserved as the broadcast address, used to send a message to every device on that subnet simultaneously. Neither of these two addresses can be assigned to an individual device — which is exactly why a /24 subnet, despite having 256 total addresses, provides only 254 usable host addresses once these two reserved addresses are subtracted.

An Important Exception: /31 and /32 Networks

The standard rule of reserving a network address and a broadcast address doesn’t apply at the very smallest subnet sizes. A /31 network, defined by RFC 3021, contains exactly 2 addresses with no separate network or broadcast address reserved at all — both addresses are usable, a deliberate design specifically for point-to-point links (a direct connection between exactly two devices) where reserving 2 out of only 4 addresses for network and broadcast would waste half the available space. A /32 network contains exactly 1 address, representing a single specific host rather than a range at all — commonly used to identify one specific device or route unambiguously. This calculator correctly handles both of these special cases rather than applying the standard reserved-address rule that would produce a nonsensical or negative usable host count at these smallest sizes.

Subnet Mask and Wildcard Mask: Two Ways to Express the Same Split

The subnet mask represents the network/host split as a dotted-decimal address itself, with network bits shown as 1s (appearing as 255) and host bits shown as 0s — a /24 network’s mask is 255.255.255.0. The wildcard mask is the exact inverse of the subnet mask, used specifically in certain networking contexts like access control lists, where the convention flips which bits are marked. This calculator provides both formats, since different tools and configuration contexts expect one or the other.

Private IP Ranges: Addresses Not Routable on the Public Internet

This calculator checks whether an entered address falls within one of the ranges reserved by RFC 1918 for private networks — 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 — addresses used within home and office networks that aren’t directly routable on the public internet, which is exactly why a home router performs network address translation (NAT) to let multiple private devices share one public-facing address. If your address falls outside these three ranges, it’s a public address, potentially routable on the internet directly.

Address Classes: A Legacy Concept Still Sometimes Referenced

This calculator’s class output (A, B, C, D for multicast, or E) reflects an older addressing scheme from before CIDR notation became standard, when networks were divided into fixed-size classes based on the address’s first octet. Classful addressing has largely been superseded by the more flexible CIDR system this calculator is built around, but the class terminology still appears occasionally in networking documentation and certifications, which is why it’s included here for reference even though modern network design relies on CIDR prefixes rather than these legacy fixed classes.

Working With Binary Directly

Every calculation this subnet calculator performs happens at the level of individual binary bits — converting an IP address into binary, applying a bitmask, and converting back. If you want to explore that underlying binary arithmetic and logic operations directly, the Binary Calculator handles binary arithmetic and bitwise AND, OR, and XOR operations, which are conceptually the same operations happening internally during subnet calculations.

Generating a Secure Network Password

Configuring network devices, whether a router or a subnet’s associated wireless network, typically requires setting a strong administrative password. The Password Generator creates cryptographically secure random passwords with adjustable length and character sets, suitable for securing the network infrastructure this subnet calculator helps plan.

Bandwidth and Transfer Time for Devices on This Network

Once a subnet is planned and devices are connected, a common follow-up question is how long a specific file transfer will take at a given connection speed. The Bandwidth Calculator handles that separate calculation, correctly converting between bits (used for connection speed) and bytes (used for file size).

Frequently Asked Questions

What does the CIDR prefix number mean?

It indicates how many of an IP address’s 32 bits are fixed as the network portion. A smaller number (like /16) leaves more bits for host addresses, creating a larger network; a larger number (like /28) leaves fewer bits, creating a smaller network with fewer usable addresses.

Why does a /24 network only have 254 usable addresses instead of 256?

Because the first address in the range is reserved as the network address and the last is reserved as the broadcast address, neither of which can be assigned to an individual device. This leaves 254 of the 256 total addresses actually usable for hosts.

Why do /31 networks not follow the usual reserved-address rule?

Because RFC 3021 specifically defines /31 networks (with only 2 total addresses) as having no separate network or broadcast address at all — both addresses are usable, a design specifically intended for point-to-point links where reserving half the available addresses would be wasteful.

What are private IP address ranges?

Address ranges reserved by RFC 1918 (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16) for use within private networks like homes and offices, not directly routable on the public internet. Devices using these addresses typically reach the internet through network address translation performed by a router.

Does this calculator support IPv6?

No — it’s built specifically for IPv4 addressing and CIDR notation. IPv6 uses a different, much larger address format and separate subnetting conventions not covered by this calculator.