Skip to content

CIDR Calculator

Shows the addresses you waste rounding up.

Work out CIDR. Shows the addresses you waste rounding up. States the assumption instead of hiding it.

Written and maintained by Mohit PatelLast checked August 4, 2026How we build these
/

Prefix needed

/25

126 usable for 100 required · 26 wasted

Prefix length/25
Subnet mask255.255.255.128
Usable hosts126
Total addresses128
Addresses wasted26
Host bits7
Network bits25
Subnets from a /242

Subnets always round up to a power of two, so asking for 100 hosts gives a /25 with 126 usable and 26 wasted. There is no way to allocate exactly 100 — the binary structure of the address space does not allow it. That waste is the argument for variable-length subnet masking. Splitting a /24 into uniform /27s gives eight subnets of 30 hosts each whether or not any of them needs 30; sizing each subnet to its actual requirement fits far more into the same space. Leave room to grow, but not too much. A subnet at 90% capacity needs renumbering the moment anything is added, and one at 5% has consumed address space that a neighbouring segment may need.

How the CIDR Calculator works

The prefix length needed for a required number of hosts, and how many addresses that wastes. Subnets round up to powers of two, so asking for 100 hosts gives 126 usable and 26 spare.

Also known as: what prefix for 100 hosts · subnet size for hosts needed · vlsm subnet planning · how many subnets from a /24

Frequently asked questions

What prefix do I need for 100 hosts?

A /25, which gives 126 usable addresses. There is no way to allocate exactly 100 — the binary structure of the address space only offers powers of two.

Why is there always waste?

Because subnet sizes are powers of two and requirements are not. The waste is worst just above a boundary: 130 hosts needs a /24 with 254 usable, leaving 124 unused.

What is VLSM?

Variable-length subnet masking — sizing each subnet to its actual requirement rather than splitting uniformly. It fits far more into the same address space and is standard practice everywhere now.

How much room should I leave?

Enough to grow, not enough to waste. A subnet at 90% capacity needs renumbering the moment anything is added; one at 5% has consumed space a neighbouring segment may need.

Does this apply to IPv6?

The arithmetic does, but the scarcity does not. IPv6 subnets are conventionally /64 regardless of host count, because the address space is large enough that conserving it serves no purpose.

Put this calculator on your own site

Free to use, on any site, commercial or not. Paste this where you want it to appear. It is a plain iframe, so it works in WordPress, Squarespace, Wix, Webflow, Ghost and anything else that accepts HTML.

The one-line version
<iframe src="https://www.thecalclibrary.com/embed/cidr-calculator" width="100%" height="640" style="border:1px solid #e2e8f0;border-radius:12px" loading="lazy" title="CIDR Calculator"></iframe>
<p style="font:13px/1.5 system-ui,sans-serif;margin:6px 0 0;color:#64748b">Powered by <a href="https://www.thecalclibrary.com/cidr-calculator" style="color:#64748b">CIDR Calculator</a> from The Calc Library</p>

The only condition is that the credit line below the frame stays in place. That one line is what pays for the tool being free — it is how anyone else finds it.

Related calculators