RunLocalTools

IP Subnet / CIDR Calculator

Enter an IP address and CIDR notation (like 192.168.1.0/24) and instantly get the subnet mask, network address, broadcast address, usable host range, and total host count — computed locally, no network lookup required.

Why CIDR math trips people up even with experience

CIDR notation compresses a lot of information into a deceptively short string. The /24 in 192.168.1.0/24 represents the number of bits reserved for the network portion of the address, and figuring out from that number alone how many usable host addresses remain, where the network boundary falls, and what the broadcast address is requires binary math that most people — even working network engineers — don’t do reliably by hand under time pressure, especially for less common subnet sizes like /27 or /29 that don’t fall on clean decimal boundaries.

How to use it

  1. Enter an IP address and CIDR prefix (e.g., 10.0.0.0/16), or enter an IP address alongside a traditional dotted-decimal subnet mask (e.g., 255.255.255.0) — the tool accepts either format and converts between them automatically.
  2. See the full breakdown instantly: network address, broadcast address, subnet mask in both CIDR and dotted-decimal form, wildcard mask, first and last usable host addresses, and total usable host count.
  3. Use the subnet splitter to divide a larger block into multiple smaller subnets of a specified size, useful when planning how to carve up an allocated address range across several departments or network segments.
  4. Toggle between IPv4 and IPv6 calculations, since IPv6’s much larger address space and different subnetting conventions require separate handling.
  5. A visual bit-map display shows exactly which bits are network versus host bits for the given prefix length, which is genuinely useful for building intuition rather than just memorizing common prefix values.

Common situations this solves

  • Planning network segmentation for a home lab, small office, or cloud VPC, figuring out how to divide an address range into appropriately-sized subnets for different purposes.
  • Verifying whether two IP addresses fall within the same subnet, which matters when troubleshooting why two devices can or can’t communicate directly.
  • Configuring a firewall rule or cloud security group that requires an exact CIDR range, translating a plain description (“give me 500 addresses starting from here”) into the correct notation.
  • Understanding an existing network’s configuration when inheriting infrastructure documentation that lists CIDR blocks without further explanation.
  • Double-checking subnet math before deploying infrastructure, where an incorrect subnet size can either waste address space or fail to accommodate enough hosts.

Frequently asked questions

Why does a /24 subnet only have 254 usable hosts instead of 256?

A /24 subnet has 256 total addresses (2⁸, since 8 bits remain for host addressing), but two of those are always reserved: the very first address is the network address (identifying the subnet itself) and the very last is the broadcast address (used to send to every host on the subnet simultaneously) — neither can be assigned to an individual device, leaving 254 usable addresses.

What’s the difference between a subnet mask and a wildcard mask?

A subnet mask marks network bits with 1s and host bits with 0s (e.g., 255.255.255.0). A wildcard mask is its exact inverse — host bits are 1 and network bits are 0 (e.g., 0.0.0.255) — and is used specifically in certain contexts like Cisco access control list configurations, which historically adopted this inverted convention rather than using the standard subnet mask directly.

How is CIDR notation different from the older “Class A/B/C” system?

The older classful system fixed subnet sizes into rigid categories (Class A, B, C) based on the address’s leading bits, which wasted enormous amounts of address space in practice. CIDR (Classless Inter-Domain Routing) replaced this with the flexible /prefix notation, letting network administrators choose subnet sizes that actually match their needs rather than being locked into a small number of predetermined sizes.

Can I use this to figure out how many /27 subnets fit inside a /24 block?

‘Yes — the subnet splitter handles exactly this kind of calculation, showing you that a /24 block splits into 8 equal /27 subnets (since each step from /24 to /27 halves the available addresses per subnet three times), along with the exact address range for each resulting subnet.

Does IPv6 subnetting work the same way as IPv4?

The underlying binary logic is the same, but IPv6’s vastly larger address space (128 bits versus IPv4’s 32) means subnetting conventions differ significantly in practice — a /64 is the standard subnet size for most IPv6 deployments regardless of how many hosts are actually needed, which is a very different mindset from IPv4’s careful conservation of a scarce address space.