NetToolsPAKISTAN

CIDR IP Range Calculator

Calculate the network range of any IPv4 or IPv6 address using CIDR notation. Enter an IP address and prefix, such as 192.168.1.50/24, to find its network address, first and last IP addresses, and total address count. For IPv4, you can also find the subnet mask, wildcard mask, and conventional usable host range.

CIDR IP Range Calculator

Find an IPv4 or IPv6 network's full address range, prefix size and address count.

Enter CIDR notation, including the slash. Example: 192.168.1.50/24 or 2001:db8::1234/64.

Examples:

How to use this CIDR calculator

Enter any IPv4 or IPv6 address followed by a slash and a prefix length. For example, 192.168.1.50/24 belongs to the network 192.168.1.0/24. The result shows that network's lowest and highest addresses, not just the address you entered.

What do the CIDR results mean?

A CIDR prefix specifies how many leading bits identify the network. A shorter prefix covers more addresses. For IPv4, the calculator also shows the dotted-decimal subnet mask and the conventional usable-host count. A /31 is treated as a two-address point-to-point link; a /32 identifies one address.

IPv6 ranges have no broadcast address. The IPv6 address count is the mathematical size of the prefix, not a count of automatically assignable hosts. Address allocation, routing, reserved ranges and network equipment settings are separate considerations.

Privacy and limitations

The input is processed locally by JavaScript and is not sent to this plugin's server endpoints. The calculator does not scan networks or identify which addresses are active. A calculated range does not establish whether the addresses are public, owned by an ISP, routable or available for assignment.

What Is CIDR Notation?

CIDR stands for Classless Inter-Domain Routing. It is a method of describing IP address blocks using an address followed by a slash and a prefix length.

For example:

192.168.1.0/24

The address 192.168.1.0 identifies the start of the network, while /24 indicates that the first 24 bits belong to the network prefix.

An IPv4 address contains 32 bits. With a /24 prefix, 8 bits remain for addresses within the network.

That gives a total of:

2⁸ = 256 IPv4 addresses

CIDR notation is commonly used in router configurations, firewall rules, IP allocation, and network administration.

IPv4 CIDR Range Calculation Example

Suppose a computer or router has the address:

192.168.1.50/24

The calculator determines the complete network containing that address, rather than treating the entered address as the beginning of the network.

ResultCalculated value
Network192.168.1.0/24
Subnet mask255.255.255.0
Wildcard mask0.0.0.255
First address192.168.1.0
Last address192.168.1.255
Total addresses256
First conventional usable host192.168.1.1
Last conventional usable host192.168.1.254
Conventional usable hosts254
Directed broadcast address192.168.1.255

For a conventional IPv4 subnet of this size, the first address represents the network and the last is the directed broadcast address.

That leaves 254 addresses in the conventional host range. Actual assignment also depends on router settings, existing allocations, and other network restrictions.

Why the Entered IP May Not Be the Network Address

Consider 10.20.30.77/26.

A /26 has 64 total IPv4 addresses per subnet. Its corresponding subnet mask is 255.255.255.192.

The address 10.20.30.77 belongs to:

  • Network: 10.20.30.64/26
  • Address range: 10.20.30.64 to 10.20.30.127
  • Conventional usable range: 10.20.30.65 to 10.20.30.126
  • Total addresses: 64

This distinction matters when configuring a router or checking whether an address belongs to a particular subnet.

Common IPv4 CIDR Prefix Sizes

Different prefix lengths produce different network sizes. A shorter prefix covers a larger address range.

CIDR prefixSubnet maskTotal IPsConventional usable hosts
/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 point-to-point endpoints
/32255.255.255.25511 individual address

The usual host-count calculation subtracts the network and broadcast addresses. However, /31 and /32 have special uses.

A /31 can use both addresses on an IPv4 point-to-point link, as described in RFC 3021. A /32 identifies a single IPv4 address, often used for a host route.

Important: These figures describe address capacity, not the number of devices guaranteed to connect successfully.

IPv6 CIDR Range Calculation

The calculator also accepts IPv6 addresses, which contain 128 bits instead of IPv4’s 32 bits.

For example, enter:

2001:db8::1234/64

The calculated network is:

2001:db8::/64

The range begins at 2001:db8:: and ends at 2001:db8::ffff:ffff:ffff:ffff.

A /64 IPv6 network contains 2⁶⁴ possible addresses, or 18,446,744,073,709,551,616 addresses mathematically.

This does not mean every address can be assigned to a device. IPv6 addressing rules, reserved identifiers, local configuration, and routing policies still apply.

Unlike IPv4, IPv6 does not use broadcast addresses. It uses mechanisms including multicast for functions that would otherwise require broadcasts.

The example 2001:db8::/32 belongs to the IPv6 documentation address space and is not intended as a real public allocation.

Subnet Mask vs. Wildcard Mask

These two values serve different purposes.

A subnet mask identifies which bits of an IPv4 address belong to the network prefix. For example, a /24 uses 255.255.255.0.

A wildcard mask is the bitwise inverse of the subnet mask. For the same /24 network, the wildcard mask is 0.0.0.255.

Wildcard masks are used in some network equipment configurations, including certain access control list and routing configurations. They should not be confused with a normal subnet mask.

The calculator displays both values for IPv4 prefixes.

When Is a CIDR IP Range Calculator Useful?

CIDR calculations help when planning network address assignments, dividing an IPv4 network into smaller subnets, reviewing router configurations, or preparing firewall address rules.

For example, if you manage a home or office network in Pakistan and your router uses 192.168.1.1/24, you can calculate the corresponding network range before deciding which addresses to reserve for printers, computers, or other devices.

A CIDR calculation does not automatically configure your router, check IP conflicts, or confirm that an address is available.

For public networks, an address falling inside a calculated CIDR block also does not establish which internet service provider owns it or whether you are authorized to use it.

How the Calculator Handles Your Data

The NetTools Pakistan CIDR IP Range Calculator performs its address calculations using JavaScript in your browser. The calculator does not need an external IP lookup API or a connection to an ISP server to calculate a network range.

It does not automatically detect your public IP, scan devices, test connectivity, or verify whether a network is online.

The calculator’s script does not submit the entered address to a calculation endpoint. Normal website operations, including hosting logs or analytics provided by the wider site, are separate from this calculator’s processing.

CIDR Calculator Questions

Can I enter any IP address within a network?

Yes. Enter a valid IPv4 or IPv6 address together with a CIDR prefix. The calculator determines the containing network, even when your entered address is not the network’s first address.

What is the difference between /24 and /16?

An IPv4 /24 contains 256 addresses, while a /16 contains 65,536 addresses. The /16 prefix leaves more bits available for addresses and therefore covers a larger range.

Can the calculator find my public IP address?

No. It calculates ranges from addresses you enter manually. It does not inspect your connection to identify your public IP or internet provider.

Does it check whether an IP address is online?

No. CIDR calculations are mathematical. Determining whether an IP address responds to network traffic requires a separate connectivity check.

Why are the usable IPv4 addresses fewer than the total?

On conventional IPv4 subnets with prefixes from /0 through /30, the network and broadcast addresses are excluded from the standard host count. The /31 point-to-point and /32 single-address cases follow different rules.

Can I use the calculator for both private and public IP ranges?

Yes. The calculator accepts valid IPv4 and IPv6 CIDR inputs regardless of whether an address is used privately or publicly. It does not verify ownership, routability, or permission to assign addresses.

Technical References

The addressing rules explained on this page are based on published internet standards:

  • RFC 4632: Classless Inter-Domain Routing (CIDR)
  • RFC 3021: Using 31-Bit Prefixes on IPv4 Point-to-Point Links
  • RFC 4291: IP Version 6 Addressing Architecture
  • RFC 5952: A Recommendation for IPv6 Address Text Representation

The calculator provides address-range arithmetic for network planning and reference purposes. Always confirm actual address assignments and network configuration requirements before making changes to production equipment.