Developer Utilities

IPv4 CIDR Calculator

Calculate IPv4 networks, masks, broadcasts, and usable host ranges.

What the IPv4 CIDR calculator returns

CIDR combines an IPv4 address with a prefix length that states how many leading bits identify the network. The calculator normalizes the entered address to its canonical network, then displays the broadcast boundary, dotted netmask, inverse wildcard mask, total address count, and usable host range.

Loading tool...

Strict input and edge cases

  • IPv4 input must contain four decimal octets from 0 through 255; ambiguous leading-zero and shorthand forms are rejected.
  • Prefix lengths from /0 through /32 are supported, as are contiguous dotted-decimal masks.
  • For /0 through /30, the network and broadcast boundaries are excluded from the usable host range.
  • For /31, both point-to-point endpoints are usable under RFC 3021; /32 represents one host route.

Operational boundary

The result describes address arithmetic, not routing reachability, firewall policy, DHCP allocation, cloud-provider reservations, VLAN membership, or whether an address is publicly routable. Apply the rules of the target network platform before allocating hosts.

Related developer tools

Continue with URL Parser, HTTP Headers Parser, HTTP Status Codes.

How to Use IPv4 CIDR Calculator

  1. Enter an IPv4 address such as 192.168.1.130.
  2. Enter a CIDR prefix such as /26 or a contiguous mask such as 255.255.255.192.
  3. Calculate the subnet and review the canonical network, boundaries, masks, and host range.
  4. Copy the result only after confirming the target platform uses the same host semantics.

Frequently Asked Questions

What input formats are supported?

Enter a canonical dotted-decimal IPv4 address and either a prefix such as /24 or a contiguous subnet mask such as 255.255.255.0.

How are /31 and /32 networks handled?

A /31 is shown with the RFC 3021 point-to-point interpretation, where both endpoints are usable and no broadcast address exists; confirm that the target link supports it. A /32 represents one host route and also has no broadcast address.

Does this calculator support IPv6?

No. This version deliberately validates IPv4 only so its address and host-range semantics remain explicit.

Sources & references

Primary references: RFC 791: Internet Protocol; RFC 4632: Classless Inter-domain Routing; RFC 3021: Using 31-Bit Prefixes on IPv4 Point-to-Point Links.

Last reviewed: