Skip to content

CIDR Calculator

Type a network such as 192.168.1.0/24 and get every subnet detail at once: masks, host range, address counts and class.

Processed locally in your browser

Options

Used when the input has no /prefix. Accepts 24, /24, 255.255.255.0 or a wildcard mask.

Formats: 192.168.1.0/24 · 192.168.1.0 255.255.255.0 · 192.168.1.0 0.0.0.255 · 2001:db8::/320 chars · 0 lines
The result will appear here.

What is CIDR Calculator?

CIDR (Classless Inter-Domain Routing) writes a network as an address plus a prefix length: 192.168.1.0/24 means the first 24 bits identify the network and the remaining 8 bits number the hosts. The prefix determines the subnet mask, the wildcard mask, the first and last address of the block and how many hosts it can hold.

This calculator accepts a /prefix, a dotted netmask, a Cisco-style wildcard mask or a bare IP with a separate prefix. It handles the special cases correctly (/31 point-to-point links per RFC 3021, /32 host routes, /0) and supports IPv6 blocks, where totals are exact big-integer values.

How does it work?

  1. Enter an address with a prefix, for example 10.0.0.0/8, or use the "Prefix or mask" option for a bare address.
  2. Read the network and broadcast address, subnet and wildcard masks, first and last usable host, and total versus usable hosts.
  3. Check the binary mask, IP class and private/public type, then copy the CIDR notation.
  4. For IPv6 blocks such as 2001:db8::/32, you get the first/last address and exact totals.

Common use cases

  • Sizing a subnet for a new VLAN and checking that it holds enough usable hosts.
  • Writing firewall or security-group rules and confirming which addresses a /22 really covers.
  • Converting between a netmask (255.255.240.0) and a prefix (/20) when configuring routers.
  • Studying for networking exams with instant, verifiable answers.

Examples

Try this input in the tool above:

Input
192.168.1.0/24
Output
192.168.1.0/24

Privacy

CIDR Calculator runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

Calculations are pure arithmetic on what you type; the tool cannot know how a network is actually allocated or routed. "Usable hosts" follows the classic convention (network and broadcast excluded) except for /31 and /32.

Frequently asked questions

How many usable hosts does a /24 have?

A /24 has 256 addresses; subtracting the network address (.0) and the broadcast address (.255) leaves 254 usable hosts.

Why does a /31 show 2 usable hosts?

RFC 3021 allows /31 subnets on point-to-point links to use both addresses as hosts because no broadcast address is needed. A /32 is a single host.

What is a wildcard mask?

It is the bitwise inverse of the subnet mask (0.0.0.255 for /24). Cisco ACLs and OSPF network statements use it to say which bits may vary.

More tools in Network Tools →