UseToolSuite UseToolSuite

IP/Subnet Calculator

Calculate IPv4 subnets from CIDR notation. Get network address, broadcast address, host range, wildcard mask, and usable host count — all instantly in your browser.

Last updated

IP/Subnet Calculator is a free, browser-based tool from UseToolSuite's Network & API Tools collection. All processing happens locally on your device — your data is never uploaded to any server. Use the tool below, then scroll down for detailed documentation, frequently asked questions, and related resources.

Advertisement
/24
/1 /8 /16 /24 /32

Visual CIDR Subnet Calculator

Calculate IPv4 subnets instantly with our zero-INP, client-side IP Strategist tool. By moving the interactive CIDR slider, you immediately render complex network structures—including usable host ranges, broadcast addresses, and binary masks—without waiting for server-side round trips.

Zero-Knowledge & URL Hydration

Your network topology data never leaves your browser. All calculations execute directly via JavaScript. Additionally, the tool seamlessly syncs your current input into the URL address bar, allowing you to copy a "Clean Configuration Link" and safely share it with your infrastructure and DevOps teams over Slack or Teams.

A prefix-to-hosts cheat sheet worth memorising

Most subnetting on the job comes down to recognising a handful of prefixes on sight. The pattern: usable hosts = 2^(32 − prefix) − 2.

CIDRMaskTotal addressesUsable hostsTypical use
/30255.255.255.25242Point-to-point links
/29255.255.255.24886Tiny appliance VLAN
/28255.255.255.2401614Small server pool
/27255.255.255.2243230Department subnet
/26255.255.255.1926462Floor / office
/24255.255.255.0256254Classic LAN
/23255.255.254.0512510Large LAN
/16255.255.0.065,53665,534Campus / VPC

The mask jumps in the familiar sequence 128, 192, 224, 240, 248, 252, 254 as you walk down each octet — once that ladder is in muscle memory you rarely need to reach for a calculator at all.

VLSM: stop wasting addresses with equal-size subnets

Carving a network into equal blocks is simple but wasteful. Variable-Length Subnet Masking (VLSM) sizes each subnet to its actual host count, largest first. Suppose you own 10.0.0.0/24 and need: 100 hosts, 50 hosts, 25 hosts, and two point-to-point links.

  1. 100 hosts → smallest fit is /25 (126 usable) → 10.0.0.0/25
  2. 50 hosts → /26 (62 usable) → 10.0.0.128/26
  3. 25 hosts → /27 (30 usable) → 10.0.0.192/27
  4. link A → /30 (2 usable) → 10.0.0.224/30
  5. link B → /30 → 10.0.0.228/30

Allocating largest-to-smallest keeps the blocks aligned and leaves a clean, contiguous pool free at the top for growth. Allocate in the wrong order and you fragment the space into unusable gaps.

/31 and /32: the special cases that look like bugs

A /31 has only two addresses and, under classic rules, zero usable hosts — yet it is the correct choice for a router-to-router link. RFC 3021 lets both addresses in a /31 be assigned to the two ends, eliminating the waste of a /30 on every link. A /32 is a single host route, used for loopbacks, /health anycast targets, and host firewall rules. If a calculator reports “0 usable hosts” for these, that is the arithmetic being honest, not an error — your routers know what to do with them.

Private ranges, and what happens when you outgrow them

RFC 1918 reserves three private blocks: 10.0.0.0/8 (16.7M addresses), 172.16.0.0/12 (1M), and 192.168.0.0/16 (65k). Pick the block that matches your scale and leaves room: home labs and small offices live happily in 192.168.x.x, but a growing organisation that started there often hits a wall and faces a painful renumber. Starting in the 10/8 space costs nothing up front and postpones that day for a very long time.

How helpful was this tool?

Click to rate

Advertisement

Key Concepts

Essential terms and definitions related to IP/Subnet Calculator.

Subnet Mask

A 32-bit number that divides an IP address into network and host portions. The mask has consecutive 1-bits for the network part and 0-bits for the host part. For example, /24 equals 255.255.255.0 — the first 24 bits identify the network and the remaining 8 bits identify hosts within that network.

Wildcard Mask

The inverse of a subnet mask, used primarily in Cisco ACLs and OSPF configurations. It is calculated by subtracting the subnet mask from 255.255.255.255. For a /24 network (subnet mask 255.255.255.0), the wildcard mask is 0.0.0.255, indicating that the last octet can vary.

CIDR (Classless Inter-Domain Routing)

A method for allocating IP addresses that replaced the old classful (Class A/B/C) system. CIDR uses variable-length subnet masking (VLSM) allowing networks to be divided into subnets of any size, reducing IP address waste and enabling more efficient routing table aggregation.

Frequently Asked Questions

What is CIDR notation and how does it work?

CIDR (Classless Inter-Domain Routing) notation represents an IP address and its associated network prefix. For example, 192.168.1.0/24 means the first 24 bits define the network, leaving 8 bits for host addresses. The number after the slash is the prefix length, which determines the subnet mask and the number of available hosts.

How many usable hosts does a /24 subnet have?

A /24 subnet has 256 total addresses (2^8), but 2 are reserved: the network address (first) and the broadcast address (last). This gives 254 usable host addresses. The formula is: usable hosts = 2^(32 - prefix) - 2.

What is the difference between network address and broadcast address?

The network address is the first address in a subnet and identifies the network itself — it cannot be assigned to a host. The broadcast address is the last address and is used to send packets to all hosts on the subnet. Both are reserved and reduce the usable host count by 2.

Can I calculate subnets for private IP ranges?

Yes. This tool works with any valid IPv4 address including private ranges: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. These are the most common ranges for internal network planning and home lab setups.

How do I split a /24 into four equal subnets?

Borrow two host bits, which moves the prefix from /24 to /26. Each /26 holds 64 addresses (62 usable). The four subnets of 192.168.1.0/24 become 192.168.1.0/26, 192.168.1.64/26, 192.168.1.128/26, and 192.168.1.192/26. The rule of thumb: each extra bit of prefix halves the subnet, so +1 bit = 2 subnets, +2 bits = 4, +3 bits = 8.

Why does AWS show fewer usable hosts in a subnet than I calculated?

Cloud providers reserve more than the standard two addresses. AWS reserves five per subnet: the network address, the VPC router (.1), a reserved DNS address (.2), a future-use address (.3), and the broadcast address. So an AWS /24 gives 251 usable hosts, not 254. Azure reserves five as well; GCP reserves four. Always size cloud subnets with the provider's reservation in mind.

Troubleshooting & Technical Tips

Common errors developers encounter and how to resolve them.

Invalid IP address format

Ensure the IP address contains exactly four octets separated by dots, with each octet being a number between 0 and 255. Examples: 192.168.1.0, 10.0.0.0. Leading zeros are not standard (use 10 not 010).

CIDR prefix out of range

The CIDR prefix must be between 0 and 32 for IPv4. Common values: /8 (Class A), /16 (Class B), /24 (Class C), /32 (single host). Values outside this range are invalid.

Unexpected calculation results for edge cases

For /31 subnets (point-to-point links, RFC 3021), there are 2 addresses and 0 usable hosts in traditional calculation, though modern routers use both. For /32, it represents a single host address. These are valid but special cases.

Related Guides

In-depth articles covering the concepts behind IP/Subnet Calculator.

Advertisement

Related Tools