Calculators.Life Calculator
Engineering

IP Range and Subnet Calculator

Input Parameters

Scenarios
Enter standard IPv4 address, e.g. 192.168.1.1
Select CIDR prefix length or subnet mask

Computed Results

Usable Host IP Range
152.59.164.9 - 152.59.164.10
Network Address (CIDR)152.59.164.8/30
Broadcast Address152.59.164.11
Subnet Mask255.255.255.252
Wildcard Mask0.0.0.3
Number of Usable Hosts2
Total Addresses4
IP Class & TypeClass B (Public)

The IP range calculator determines the usable host addresses, network address, and broadcast address for a given IPv4 subnet. It helps network administrators and IT professionals quickly identify subnet masks, wildcard masks, and total host capacity based on an IP address and its CIDR prefix.

Practical Use Cases

Calculating exact IP ranges and subnet boundaries is a fundamental part of network administration. Common applications include:

Subnet Calculation Formulas

Subnetting divides a 32-bit IPv4 address into a network portion and a host portion. The CIDR (Classless Inter-Domain Routing) prefix indicates how many bits are assigned to the network. The remaining bits determine the host capacity.

To find the total number of addresses in a subnet, subtract the CIDR prefix from 32 and raise 2 to that power:

Total Addresses = 2^(32 − CIDR)

In standard subnets, the first address is reserved for the network identifier, and the last address is reserved for the broadcast address. Therefore, the number of usable hosts is typically two less than the total addresses:

Usable Hosts = Total Addresses − 2

Note: Exceptions exist for /31 subnets (used for point-to-point links, providing exactly 2 usable hosts) and /32 subnets (representing a single host address).

Verified Subnet Scenarios

Here are examples of how different CIDR prefixes affect the usable IP range and host capacity:

Standard Class C Home Network

A typical local network uses a /24 subnet. If the IP address is 192.168.1.50 with a /24 CIDR, the network address is 192.168.1.0/24. The usable IP range spans from 192.168.1.1 to 192.168.1.254, providing 254 usable hosts out of 256 total addresses. This falls under Class C (Private).

Small Office Subnet

For a smaller segmented network, a /28 subnet might be used. Given the IP 172.20.10.5 with a /28 CIDR, the network address is 172.20.10.0/28. The usable range is 172.20.10.1 to 172.20.10.14, yielding 14 usable hosts. The broadcast address is 172.20.10.15, and the subnet mask is 255.255.255.240.

Point-to-Point Link Boundary Case

Router-to-router connections often use a /31 subnet to conserve IP addresses. If the IP is 172.16.5.1 with a /31 CIDR, the network address is 172.16.5.0/31. The usable IP range is exactly 172.16.5.0 to 172.16.5.1, providing 2 usable hosts and 2 total addresses, with a subnet mask of 255.255.255.254.

Frequently Asked Questions

Why are there two fewer usable hosts than total addresses in most subnets?

In standard IPv4 subnetting, the first address in the range is reserved as the network address to identify the subnet itself, and the last address is reserved as the broadcast address to send messages to all hosts on that subnet. These cannot be assigned to individual devices.

What is a wildcard mask?

A wildcard mask is the inverse of a subnet mask. It is commonly used in routing protocols (like OSPF) and access control lists (ACLs) to specify which parts of an IP address must match a rule and which parts can be ignored.

How does a /31 subnet work if it only has two addresses?

A /31 subnet is a special case defined by RFC 3021 for point-to-point links. Because there are only two devices on the link, the standard network and broadcast addresses are not required, allowing both available IP addresses to be assigned to the connected router interfaces.

Author portrait
About the Author
Arnab Biswas

Calculator developer and SEO strategist who builds practical online calculators and tests calculation logic, input handling, and expected results using real-world scenarios.