tool hub Tool Hub

CIDR Calculator

CIDR Calculator — runs in your browser. Inputs are not stored.

Runs in your browser No sign-up Free to use


CIDR Calculator (IPv4)

Enter values, then press Calculate.

How to use

  1. Enter an IPv4 address and prefix in CIDR. The default example is 192.168.1.0/24.
  2. Press Calculate for network, broadcast, subnet mask, and wildcard.
  3. In the same result see first host, last host, usable hosts, and total addresses.
  4. Invalid format shows an error. Octets must be 0–255 and the prefix 0–32.
  5. Reset returns to the sample CIDR. Calculation runs only in the browser.

Key concepts

CIDR writes a subnet as an IP plus prefix length. /24 equals mask 255.255.255.0, with the first 24 bits as the network. This calculator ANDs the input address with the mask to align the network address, then uses the inverted mask for broadcast and wildcard. Even if the input IP is not the network address, the AND result is shown as the network. For example 192.168.1.50/24 still has network 192.168.1.0/24.

At /30 and shorter prefixes, usable hosts exclude network and broadcast. /31 and /32 are point-to-point or a single address, so usable hosts equal total addresses and first/last host follow that range. IPv6 prefixes are not covered. Wildcards mark “don’t-care” bits in ACLs and filters. Total addresses are 2^(32−prefix); a large /8 reaches tens of millions.

Example

192.168.1.0/24 → network 192.168.1.0/24, broadcast 192.168.1.255, mask 255.255.255.0, wildcard 0.0.0.255. First host 192.168.1.1, last 192.168.1.254, usable 254, total 256. Large blocks such as 10.0.0.0/8 follow the same rules. 172.16.0.0/12 is a typical RFC1918 private range. The calculator immediately shows mask 255.240.0.0 and usable hosts for that prefix.

Related: IPv4→IPv6 mapping · my IP · web calculator

Frequently asked questions

What does /24 mean in the CIDR calculator?

Eight host bits. Of 256 total addresses, drop network and broadcast for 254 usable hosts. The mask is 255.255.255.0. /25 is 128 total, 126 usable. A common size when splitting VLANs or guest networks.

How are subnet mask and wildcard produced?

The mask is the prefix length in 1-bits, shown in dotted decimal. The wildcard is those bits inverted, often used in ACLs. Cisco-style ACLs want a wildcard; Linux ip accepts a mask or CIDR. Copy either from this result.

Are CIDR /31 and /32 calculated?

Yes. /31 and /32 have special host-count meaning; this tool treats total addresses as usable and aligns the range. See RFC 3021 for point-to-point. /31 has two addresses for a link; /32 is a host route. General LAN DHCP more often uses /24.

What is the difference between usable hosts and total addresses?

Total addresses are 2^(32−prefix). At /30 and shorter, subtract network and broadcast to get usable hosts. Using broadcast as a host causes collisions. Assign only first–last in the usable fields to endpoints.

Is IPv6 CIDR supported?

The default is IPv4. For mapping notation only, use the IPv4→IPv6 mapping tool. IPv6 subnets are 128-bit, so this arithmetic does not apply.

Can I enter the private range 192.168.0.0/16?

Yes. Only bit math is done, public or private. It is separate from real routing and DHCP. Public assignment is not judged. RFC1918 private and public use the same bit math.

CIDR Calculator cover image
Your input is not sent to the server and disappears when you close the page.

Last reviewed: 2026-09-04