---
title: "CIDR Calculator"
description: "IPv4 and IPv6 subnet calculator: netmask, wildcard, network, broadcast, host range, and counts from any CIDR notation."
url: "https://freshjuice.dev/tools/cidr-calculator/"
---
## About this tool

Enter an address with a prefix — `192.168.1.0/24` or`2001:db8::/32` — and get the full subnet breakdown. IPv4 shows netmask, wildcard, network/broadcast, and usable host range; IPv6 shows the compressed and expanded forms plus the (astronomical) address count.

## Quick reference

-   `/24` — 256 addresses, 254 usable hosts (classic "Class C" size)
-   `/30` — 4 addresses, point-to-point links
-   `/31` — RFC 3021 point-to-point, both addresses usable
-   `/32` — a single host route

All math is bitwise on integers (IPv4) or BigInt (IPv6) — no server lookup, no address leaves your browser.

## Frequently Asked Questions

### How many usable hosts are in my subnet?

For IPv4: 2^(32 − prefix) − 2. The two lost addresses are the network (all host bits zero) and broadcast (all host bits one); they exist but can't be assigned. A `/24` has 256 addresses, 254 usable. A `/30` has 2 usable, which is why point-to-point links use it. Exception: `/31` (RFC 3021) makes both addresses usable, and `/32` is the host itself.

### Why does the tool show two fewer hosts than total addresses?

The first and last addresses in an IPv4 subnet are reserved: the lowest is the network identifier, the highest is the broadcast address. You can't assign either to a device. The tool lists both so you can see exactly where the usable range starts and ends.

### Can it handle IPv6?

Yes. Enter any IPv6 address or prefix, `2001:db8::/32` for example, and get the expanded notation, compressed canonical form, and address count (computed with BigInt, because a `/32` holds over 79 octillion addresses and regular numbers can't). Note IPv6 has no broadcast and no reserved first/last address, so every address is usable.

### What's the difference between the netmask and wildcard mask?

They're bitwise complements. The netmask (`255.255.255.0` for a `/24`) has 1s for network bits and 0s for host bits, and derives the network. The wildcard (`0.0.0.255`) is its inverse, and it's what Cisco ACLs expect when you write `access-list 1 permit 192.168.1.0 0.0.0.255`. Both are shown so you don't have to flip bits by hand.

### Is 192.168.1.1/24 the same subnet as 192.168.1.0/24?

Yes. The address you supply is just the seed; the calculator zeroes out the host bits to find the actual network address. Both inputs produce network `192.168.1.0/24`, broadcast `192.168.1.255`, and the same host range. That's the point of CIDR: the prefix length defines the boundary, not which address you typed.

### Does any address I enter get sent to a server?

No. All computation is bitwise math on integers (IPv4) or BigInt (IPv6) in your browser. No WHOIS, no geolocation, no network request. Useful when planning internal ranges you'd rather not leak to a third-party API.
