Skip to main content

CIDR Calculator

Available
Networking

Calculate subnet information from an IPv4 CIDR notation, including network address, broadcast address, subnet mask, wildcard mask, usable host range, and number of available hosts.

CIDR Calculator tool

CIDR Input

Enter an IPv4 address in CIDR notation. Results update automatically as you type.

Try:

Results

192.168.1.100/24

Private
Class C
Private

Network Address

192.168.1.0

Broadcast Address

192.168.1.255

Subnet Mask

255.255.255.0

Wildcard Mask

0.0.0.255

CIDR Prefix

/24

IP Version

IPv4

First Usable Host

192.168.1.1

Last Usable Host

192.168.1.254

Total Addresses

256

Usable Hosts

254

Network Class

C

Address Type

Private

Private / Public

Private

Reverse DNS

100.1.168.192.in-addr.arpa

Host Range

192.168.1.1192.168.1.254

Usable Hosts

254

Total Addresses

256

Binary Representation

Network bits vs. host bits

IP Address

Subnet Mask

24 network bits8 host bits

CIDR Cheat Sheet

Every prefix from /0 to /32, with its subnet mask and usable host count.

PrefixSubnet MaskTotalUsable Hosts
/32255.255.255.25511
/31255.255.255.25422
/30255.255.255.25242
/29255.255.255.24886
/28255.255.255.2401614
/27255.255.255.2243230
/26255.255.255.1926462
/25255.255.255.128128126
/24255.255.255.0256254
/23255.255.254.0512510
/22255.255.252.01,0241,022
/21255.255.248.02,0482,046
/20255.255.240.04,0964,094
/19255.255.224.08,1928,190
/18255.255.192.016,38416,382
/17255.255.128.032,76832,766
/16255.255.0.065,53665,534
/15255.254.0.0131,072131,070
/14255.252.0.0262,144262,142
/13255.248.0.0524,288524,286
/12255.240.0.01,048,5761,048,574
/11255.224.0.02,097,1522,097,150
/10255.192.0.04,194,3044,194,302
/9255.128.0.08,388,6088,388,606
/8255.0.0.016,777,21616,777,214
/7254.0.0.033,554,43233,554,430
/6252.0.0.067,108,86467,108,862
/5248.0.0.0134,217,728134,217,726
/4240.0.0.0268,435,456268,435,454
/3224.0.0.0536,870,912536,870,910
/2192.0.0.01,073,741,8241,073,741,822
/1128.0.0.02,147,483,6482,147,483,646
/00.0.0.04,294,967,2964,294,967,294

How to use the CIDR Calculator

  1. Type an IPv4 address with a prefix length, such as 192.168.1.0/24, or choose one of the examples.
  2. Read the network address, broadcast address, subnet mask, wildcard mask and the first and last usable host.
  3. Check the total and usable address counts before settling on a prefix length.
  4. Use the binary view to see exactly which bits belong to the network and which to hosts.
What you enter
An IPv4 address in CIDR notation: four decimal numbers from 0 to 255, a slash, then a prefix length from 0 to 32.
What you get
The network and broadcast addresses, subnet and wildcard masks, host range, address counts, network class, whether the range is private, and a binary breakdown.

Who it is for

  • Cloud and network engineers planning VPC or subnet layouts
  • Developers writing firewall, security group or routing rules
  • Students learning how subnetting works

Examples

192.168.1.0/24

192.168.1.0/24

Network 192.168.1.0, broadcast 192.168.1.255, mask 255.255.255.0, usable hosts 192.168.1.1 to 192.168.1.254 (254 usable of 256 addresses).

10.0.0.0/26

10.0.0.0/26

Mask 255.255.255.192, 64 addresses, 62 usable, hosts 10.0.0.1 to 10.0.0.62, broadcast 10.0.0.63.

A host address inside a block

172.16.5.77/20

The block containing that host starts at 172.16.0.0 and ends at 172.16.15.255; the tool shows the network address the host belongs to.

Key concepts

Prefix length
The number after the slash says how many of the 32 bits identify the network. The remaining bits identify hosts. A longer prefix means a smaller network: /24 holds 256 addresses, /26 holds 64.
Subnet mask and wildcard mask
The subnet mask writes the prefix as four numbers (/24 is 255.255.255.0). The wildcard mask is its inverse (0.0.0.255) and appears in some router access lists.
Network, broadcast and usable addresses
In a normal subnet the first address names the network and the last is the broadcast address, so usable hosts are the total minus two. /31 and /32 are special cases: a /31 is used for point-to-point links and a /32 is a single host.
Private ranges
Three IPv4 blocks are reserved for private networks: 10.0.0.0/8, 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16. They are not routed on the public internet.
Cloud networking
When you carve up a VPC, choose blocks that do not overlap with each other or with networks you may connect later. Cloud providers also reserve a few addresses in each subnet (AWS and Azure reserve five), so a small subnet has fewer usable hosts than the arithmetic suggests.

Common use cases

  • Choose a prefix that gives enough addresses for a subnet without wasting a whole block.
  • Confirm that a firewall or security group rule covers the range you intend.
  • Check whether two blocks overlap before peering networks or setting up a VPN.
  • Translate between prefix lengths and dotted masks when a device asks for one form.

Common mistakes

Entering a host address and assuming it is the network
10.0.0.77/24 belongs to the network 10.0.0.0/24. The calculator shows the real network address so you can see the difference.
Counting all addresses as usable
Subtract the network and broadcast addresses in ordinary subnets, and remember any addresses your cloud provider reserves.
Mixing up mask and wildcard mask
255.255.255.0 and 0.0.0.255 describe the same /24 in opposite ways. Use whichever your device expects.
Planning without room to grow
A /28 may fit today's servers but leave no space for scaling. Leave headroom, or choose a larger block for the VPC and subnet it later.

Limitations

  • IPv4 only; IPv6 prefixes are not supported.
  • It calculates one block at a time and does not design a whole address plan for you.
  • It does not know about the addresses a particular cloud provider or device reserves.

Results are an aid, not a guarantee. Please read the Disclaimer.

Troubleshooting

The calculator says my input is invalid
Use four numbers from 0 to 255 separated by dots, a slash and a prefix from 0 to 32, with no spaces.
The network address is not what I typed
That is expected when you enter a host address. The result shows the block that address belongs to.
Usable hosts for a /31 or /32 look odd
Those prefixes are special cases. See the guide to /32 below.

Privacy

The calculation happens in your browser. The addresses you enter are not sent to DevCraftKit. Full details are in the Privacy Policy.

Related guides

Made subnetting a little easier?

If these free developer tools save you time, consider buying me a byte. Your support helps keep DevCraftKit free and growing.

Buy me a byte 💾

Resources

View all

Explore more developer tools

Browse the full collection, or see everything in Networking.

Frequently Asked Questions

What is CIDR?
CIDR (Classless Inter-Domain Routing) is a notation for describing an IP address together with how many bits of it are the network portion, written as ip/prefix (e.g. 192.168.1.0/24). It replaced the older fixed class A/B/C system, letting networks be sized to whatever number of hosts they actually need.
What is subnetting?
Subnetting is splitting a larger network into smaller, self-contained sub-networks by borrowing bits from the host portion of an address for the network portion. It's how a single allocated block (like a /16) gets divided into many smaller /24s for different departments, sites, or VLANs.
What is a network address?
The network address is the first address in a CIDR block - the one with every host bit set to 0. It identifies the subnet itself rather than any specific device on it, and is not assignable to a host (except in /31 and /32 blocks, which have no separate network address).
What is a broadcast address?
The broadcast address is the last address in a CIDR block - the one with every host bit set to 1. Traffic sent to it is delivered to every host on that subnet. Like the network address, it's reserved and not assignable to an individual host in blocks /30 and larger.
How many hosts are available in a /24?
A /24 has 256 total addresses (2^8, since 8 bits are left for hosts). Subtracting the reserved network and broadcast addresses leaves 254 usable host addresses - the most common subnet size for small office and home networks.
What is a wildcard mask?
A wildcard mask is the bitwise inverse of a subnet mask, used mainly in Cisco ACLs and OSPF configuration. Where a subnet mask has a 1 for network bits and 0 for host bits, a wildcard mask flips that - so a /24's subnet mask of 255.255.255.0 has a wildcard mask of 0.0.0.255.
Why do /31 and /32 not have separate usable host ranges?
A /32 addresses exactly one host, so there's no room for a separate network or broadcast address - the single address is the host. A /31 (RFC 3021) is a special case for point-to-point links: with only 2 addresses available, both are treated as usable host addresses rather than reserving one as a broadcast address.

Found a bug or an incorrect result in CIDR Calculator?

Report it, or suggest an improvement. Messages go straight to the developer.

Send feedback