TRY OUR NEW TOOL⌕ FREE PROXY CHECKERTRY IT NOW

Subnet arithmetic

IP range and CIDR calculator

Work out the bounds of a subnet, turn a range into CIDR blocks, or expand a block into a list — what you need when a provider hands you a subnet and a panel asks for an allowlist.

192.0.2.0/24

Network address
192.0.2.0
Broadcast
192.0.2.255
First host
192.0.2.1
Last host
192.0.2.254
Netmask
255.255.255.0
Wildcard mask
0.0.0.255
Total addresses
256
Usable for hosts
254
Kind
Public range

Range to CIDR

Covering blocks: 4

IPv4 only. Everything is computed in your browser.

What the calculator gives you

From an address and a prefix it works out the network address, the broadcast address, the first and last usable host, the total and usable host counts, and the mask in both dotted and wildcard form. It also goes the other way: an arbitrary start and end address become the minimum set of CIDR blocks that covers them exactly, and a block expands into a plain list of addresses.

The prefix is simply how many leading bits are fixed. A /24 fixes 24 bits and leaves 8 for hosts — 256 addresses, of which 254 are usable once the network and broadcast addresses are taken out. Each step down the prefix doubles the block: /23 is 512, /22 is 1024. The two exceptions worth knowing are /31, which is used for point-to-point links where both addresses are usable, and /32, which is a single host.

Reference

Prefix

Mask

Addresses

Usable hosts

/32

255.255.255.255

1

1 (single host)

/30

255.255.255.252

4

2

/29

255.255.255.248

8

6

/28

255.255.255.240

16

14

/24

255.255.255.0

256

254

/22

255.255.252.0

1024

1022

/16

255.255.0.0

65 536

65 534

/8

255.0.0.0

16 777 216

16 777 214

When you need it

Limits

The calculator handles IPv4 and runs entirely in your browser. Expanding a block into a list of addresses is capped, because a /8 is sixteen million lines and the browser, not the server, would be the one to fall over. To find out who a particular address belongs to, use the IP lookup.

Frequently asked questions

What does /24 mean?

That the first 24 bits of the address are fixed and the remaining 8 identify hosts: 256 addresses in total, 254 usable after the network and broadcast addresses are set aside.

Why are two addresses unusable in most subnets?

The first is the network address, which names the subnet itself, and the last is the broadcast address. Neither can be assigned to a host. The exceptions are /31, where both are usable on point-to-point links, and /32, which is one host.

What is a wildcard mask?

The bitwise inverse of the subnet mask — /24 gives 0.0.0.255. Cisco ACLs and several other systems expect it in that form, which is why the calculator shows both.

Can I convert an arbitrary range to CIDR?

Yes. A range that does not align to a single block is expressed as the smallest set of blocks that covers it exactly, which is what firewalls and route tables need.

Does it support IPv6?

Not yet — this calculator is IPv4 only. IPv6 subnetting follows the same prefix logic but with 128 bits, where the host portion is normally so large that host counts stop being a practical concern.

Why is the address list limited?

Because expanding a large block means rendering millions of lines in your browser. The cap keeps the page responsive; if you need a huge enumeration, generate it in a script rather than a page.