1. Home
  2. Networking
  3. CIDR Calculator

CIDR Calculator

Work out the address range, subnet mask, wildcard and host count of any IPv4 or IPv6 CIDR block.

Runs in your browser
Examples:
Enter an address.

IP range to CIDR

    Is this IP in the block?

    Enter an address to check.
    IPv4 CIDR cheat sheet
    IPv4 prefixes with masks and host counts
    PrefixSubnet maskAddressesUsable hosts
    /8255.0.0.01,67,77,2161,67,77,214
    /9255.128.0.083,88,60883,88,606
    /10255.192.0.041,94,30441,94,302
    /11255.224.0.020,97,15220,97,150
    /12255.240.0.010,48,57610,48,574
    /13255.248.0.05,24,2885,24,286
    /14255.252.0.02,62,1442,62,142
    /15255.254.0.01,31,0721,31,070
    /16255.255.0.065,53665,534
    /17255.255.128.032,76832,766
    /18255.255.192.016,38416,382
    /19255.255.224.08,1928,190
    /20255.255.240.04,0964,094
    /21255.255.248.02,0482,046
    /22255.255.252.01,0241,022
    /23255.255.254.0512510
    /24255.255.255.0256254
    /25255.255.255.128128126
    /26255.255.255.1926462
    /27255.255.255.2243230
    /28255.255.255.2401614
    /29255.255.255.24886
    /30255.255.255.25242
    /31255.255.255.25422
    /32255.255.255.25511

    What is the CIDR Calculator?

    CIDR notation writes a network as an address and a prefix length, such as 192.168.1.0/24: the first 24 bits identify the network and the remaining 8 bits number the hosts inside it. From that one line you can work out the network and broadcast addresses, the first and last usable host, the subnet mask and how many devices fit.

    Type an address with a prefix (or with a dotted mask like 255.255.255.0) and every value is calculated instantly, with the address in binary so you can see where the network part ends. It works for IPv6 too, and includes an IP range to CIDR converter and a check for whether an address falls inside the block.

    How to use it

    1. Enter an address with a prefix, like 10.20.30.40/22, or with a mask, like 10.20.30.40 255.255.252.0.
    2. Read the network, broadcast, host range, masks and counts.
    3. Drag the prefix slider to see how the block changes.
    4. Use the extra tools to convert an IP range to CIDR blocks or to check if an IP is inside the block.

    Example

    Input
    192.168.1.130/26
    Output
    Network 192.168.1.128 · Broadcast 192.168.1.191
    Hosts 192.168.1.129 – 192.168.1.190 (62)
    Mask 255.255.255.192 · Wildcard 0.0.0.63

    Features

    • Everything at once. Network, broadcast, first and last host, mask, wildcard, prefix, counts, class and type.
    • IPv6 support. Network and last address, compressed and expanded forms, address count and type.
    • Binary view. See the network bits and host bits of the address and mask.
    • Range to CIDR. Turn any start and end address into the smallest list of CIDR blocks.
    • Address types. Spots private (RFC 1918), CGNAT, loopback, link-local, multicast and documentation ranges.
    • Cheat sheet. A table of every IPv4 prefix from /8 to /32 with its mask and host count.

    Frequently asked questions

    How many hosts are in a /24?

    A /24 has 256 addresses. The first (network) and last (broadcast) are reserved, so 254 can be used by devices. In general a /n has 2^(32−n) addresses and 2^(32−n) − 2 usable hosts, except /31 (2, for point-to-point links) and /32 (a single host).

    What is a wildcard mask?

    The inverse of the subnet mask: 255.255.255.0 becomes 0.0.0.255. Cisco access lists and OSPF use wildcard masks, where 0 bits must match and 1 bits can be anything.

    Which IP ranges are private?

    10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918) are for private networks and are not routed on the internet. 100.64.0.0/10 is used by internet providers for carrier-grade NAT.

    How do I convert a subnet mask to a prefix?

    Count the 1 bits in the mask: 255.255.255.0 has 24, so it is /24; 255.255.252.0 is /22. Type the address and mask here and the prefix is shown for you.

    How big is an IPv6 /64?

    A /64 holds 2^64 addresses, about 18 quintillion. It is the standard size for a single IPv6 subnet; providers usually give homes a /56 or /48.

    Last updated · Free, no sign-up, runs in your browser.

    Free for everyone, kept free by you.

    No paywall, no sign-up and no watermarks. If a tool saved you time, you can chip in any amount by UPI to keep Nova Free Tools running.

    Esc
    ↑↓ move↵ openEsc close