Tech News, Tech & Coding · Free Online Tools

IT Question Answer
Tools
Developer & Text ToolsFree100% Client-Side

CIDR & Subnet Calculator

Calculate network, broadcast, masks and host range for any IPv4 CIDR block and check if an IP is inside it.

100% privateRuns instantly in-browserUpdated regularly

Advertisement

Runs in your browser

Your input is processed on your device and is not uploaded to our servers.

Fast

No queues and no upload wait, so results appear as soon as you act.

Clean and simple

Dark mode, no popups, and no signup.

What you get

  • Network and broadcast address
  • Subnet and wildcard mask
  • First and last usable host
  • Total and usable host counts
  • IP in range check

What CIDR notation means

CIDR (Classless Inter-Domain Routing) writes a network as an address and a prefix length, for example 192.168.10.0/24. The number after the slash says how many bits of the address identify the network. The remaining bits identify hosts inside it. A /24 leaves 8 bits for hosts, so it holds 256 addresses. A /16 holds 65,536.

This calculator takes an IPv4 address with a prefix and returns the full picture: network address, broadcast address, subnet mask, wildcard mask, first and last usable host, total and usable addresses, the address class and type, and the binary form of the mask.

How to use it

  • Type an address and prefix, such as 10.0.1.0/24, or pick a preset.
  • Read the results. They update as you type.
  • To test whether an IP belongs to the block, type it in the check field.

Common prefix sizes

A quick reference:

/32   1 address       a single host
/30   4 addresses     2 usable (point-to-point links)
/28   16 addresses    14 usable
/24   256 addresses   254 usable
/16   65,536          65,534 usable
/8    16,777,216      16,777,214 usable

Why two addresses are not usable

In a normal subnet the first address is the network address and the last is the broadcast address, so usable hosts are the total minus two. The exceptions are /31 networks, which are used for point-to-point links and have two usable addresses, and /32, which is a single host.

Private ranges to know

  • 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are private ranges for internal networks.
  • 127.0.0.0/8 is loopback, for the machine itself.
  • 169.254.0.0/16 is link-local, assigned when no address server answers.
  • Keep subnets in cloud networks from overlapping if you plan to connect them.

Related tools

  • Chmod Calculator: Set Linux file permissions with checkboxes and get the octal value, symbolic form and chmod command.
  • Unix Timestamp Converter: Convert Unix epoch seconds or milliseconds to a readable date and back, with live current epoch time.
  • Regex Tester & Generator: Test, validate, and debug regular expressions in real-time with our 100% client-side tool.
  • URL Encoder / Decoder: Encode or decode URLs and query strings using percent-encoding, right in your browser.

Advertisement

Frequently asked questions

The first 24 bits identify the network and 8 bits are left for hosts. That gives 256 addresses and 254 usable hosts.

It is the inverse of the subnet mask. It is used in some router and firewall rules.

No. This calculator is for IPv4 only.

One address is the network address and one is the broadcast address, and neither can be given to a host.

No. The calculations run in your browser.