Subnet and CIDR Calculator

Work out the network, host range and mask for an IPv4 or IPv6 prefix.

Inputs stay on your device No sign-up Free to use
How this works

The tool runs in this browser. Your file or text is not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

Privacy details

Calculate controls

Showing an example. Edit to see your own.

IPv4 or IPv6. You can also paste a prefix with it, such as 192.168.1.10/24 or 2001:db8::1/64.

Used when the address above has no /prefix of its own. IPv4 stops at 32 and IPv6 at 128.

Processed in your browser. Your inputs stay on this device.

How to use Subnet and CIDR Calculator

  1. Paste the address, and add a prefix if you like: 192.168.1.10/24 works as a single field.
  2. Leave the prefix field alone when the address already carries one, or type 0 to 32 for IPv4 and 0 to 128 for IPv6.
  3. Read the network address, the host range and the totals, then check that the address you started with sits inside them.
  4. Copy the result into a ticket, a configuration note or a change record.

Example: Subnet and CIDR Calculator

Check which hosts belong to a small office subnet.

You add
Address 192.168.1.10, prefix 24.
You get
Network 192.168.1.0, broadcast 192.168.1.255, usable hosts 192.168.1.1 to 192.168.1.254, 254 usable addresses, mask 255.255.255.0, and a note that 192.168.1.10 falls inside the range.

Options

IPv6 keeps its own rules
An IPv4 prefix is 32 bits and an IPv6 prefix is 128. IPv6 has no broadcast address, so the result reports the first and last address in the prefix instead and never prints a broadcast line for it.
Point-to-point and single-host prefixes
A /31 describes a two-address point-to-point link under RFC 3021, so it has no separate network and broadcast address, and a /32 is one host. The page names both cases rather than subtracting two and reporting a count that makes no sense.

Supported inputs and limits

IPv4 accepts dotted decimal with four parts from 0 to 255, and IPv6 accepts full, compressed and IPv4-mapped forms. Prefixes run from 0 to 32 for IPv4 and 0 to 128 for IPv6. A /31 is described as a two-address point-to-point link, per RFC 3021, rather than as a general subnet, and a /32 is a single host. Hex shorthand such as 10.1, and leading zeros inside an IPv4 octet, are refused rather than guessed at. IPv6 totals are exact whole numbers that run far past what a spreadsheet can hold, so they are printed as digits. Everything is calculated locally with no lookup, so the page cannot say whether an address is in use, routed, or assigned to you.

Where your input is processed

This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

What a prefix length decides

An IPv4 address is 32 bits, an IPv6 address is 128, and the prefix length says how many of those bits name the network rather than the host. Every device in the subnet shares the network part; the remaining bits pick out one device. The network address has all the host bits set to zero, and in IPv4 the broadcast address has them all set to one, which is why the usable range is the space between the two. A shorter prefix therefore means a much larger subnet. IPv6 uses the same idea for the prefix, but the address with every host bit set to one is an ordinary address there rather than a broadcast. Two prefixes step outside the usual subtraction: a /32 names one host, and a /31 is the point-to-point pair defined in RFC 3021, where both addresses belong to the two ends of the link.

RFC 3021, Using 31-Bit Prefixes on IPv4 Point-to-Point Links

Questions about Subnet and CIDR Calculator

Why does a /31 show two usable addresses?

RFC 3021 defines a /31 for point-to-point links between two devices, and on that link both addresses belong to hosts, with no separate network and broadcast address. The page names that case instead of subtracting two addresses the pair does not really have, and it keeps the wording to point-to-point links rather than a general subnet.

Where is the IPv6 broadcast address?

IPv6 does not have one. It uses multicast for that job, so the page reports the first and last address inside the prefix and leaves the broadcast line out.

Why was 192.168.1.010 refused?

A leading zero inside an octet is read as decimal by some tools and as octal by others, so the two disagree about which address 192.168.1.010 means. Drop the zero and use 192.168.1.10.

Is my address sent anywhere?

No. The arithmetic runs in this browser using plain JavaScript and BigInt. Nothing is looked up, logged or uploaded.

Can I plan a whole network with this?

Use it to check the arithmetic of a prefix you already chose. It knows nothing about your routers, switches, DHCP pools or reservations, so confirm the range against your own address plan before handing it out.

Project manager: Tony Hines · Content updated 29 September 2026 · Report a problem