IPv4 Subnet Calculator

Calculate your IPv4 subnet information instantly using an IP address and subnet mask or CIDR prefix. Our free IPv4 Subnet Calculator helps you find the network address, broadcast address, subnet mask, wildcard mask, usable IP range, and total number of host addresses.

Enter an address such as 192.168.1.10/24 to calculate its subnet details. You can also use a dotted-decimal mask, such as 192.168.1.10/255.255.255.0.

The calculator supports IPv4 prefix lengths from /0 to /32. It is useful for planning home networks, configuring routers, and understanding IP address allocations.

IP & Network Address

IPv4 Subnet Calculator

Enter an IPv4 address and CIDR prefix or subnet mask to calculate the network, address range and host capacity. Calculations run in your browser.

Examples: 192.168.1.10/24 or 10.0.0.5/255.255.255.252. Prefixes from /0 to /32 are supported.

Try an example:

How to Use the IPv4 Subnet Calculator

  1. Enter an IPv4 address followed by a CIDR prefix, such as 192.168.1.10/24.
  2. Alternatively, enter an IP address followed by its subnet mask, such as 192.168.1.10/255.255.255.0.
  3. Click Calculate subnet.
  4. Review the network address, subnet mask, broadcast address, address range, and available host information.
  5. Use Copy results if you need to save the calculations for network configuration or documentation.

You can also select one of the example networks provided in the calculator.

Understanding Your Subnet Calculation Results

The calculator displays several values that help explain how an IPv4 network is divided.

Result What it means
Network address The starting address identifying the subnet
Subnet mask Identifies which bits belong to the network portion
CIDR notation Expresses the network using an address and prefix length
Broadcast address The directed-broadcast address for a conventional IPv4 subnet, where applicable
First usable address The first address available under the applicable subnet convention
Last usable address The last address available under that convention
Total addresses The number of IPv4 addresses in the subnet
Usable hosts The theoretical number of addresses available for hosts
Wildcard mask The bitwise inverse of the subnet mask

The tool also displays the complete subnet address range, number of host bits, and binary representation of the network address.

IPv4 Subnet Calculation Example

Suppose your router or computer uses the address 192.168.1.10 with a /24 prefix.

The resulting subnet information is:

  • Network address: 192.168.1.0
  • Subnet mask: 255.255.255.0
  • Wildcard mask: 0.0.0.255
  • Broadcast address: 192.168.1.255
  • First usable IP: 192.168.1.1
  • Last usable IP: 192.168.1.254
  • Total IP addresses: 256
  • Usable host addresses: 254

A /24 prefix uses 24 bits for the network and leaves 8 bits for the host portion. This provides 256 total addresses.

Under conventional IPv4 subnetting, the network and directed-broadcast addresses are not assigned to ordinary hosts, leaving 254 usable addresses.

This is a common subnet configuration for small private networks, although the actual address range and DHCP settings depend on your router or network administrator.

IPv4 CIDR and Subnet Mask Reference

Classless Inter-Domain Routing (CIDR) identifies an IPv4 network using a prefix length between 0 and 32.

A larger prefix means more network bits and fewer host addresses.

Here are some commonly used subnet sizes.

CIDR Subnet mask Total IPs Usable hosts
/24 255.255.255.0 256 254
/25 255.255.255.128 128 126
/26 255.255.255.192 64 62
/27 255.255.255.224 32 30
/28 255.255.255.240 16 14
/29 255.255.255.248 8 6
/30 255.255.255.252 4 2
/31 255.255.255.254 2 2*
/32 255.255.255.255 1 1

For /31, both addresses can serve as endpoints on a point-to-point link under RFC 3021. A /32 represents a single address rather than a conventional multi-host subnet.

How IPv4 Subnet Calculation Works

IPv4 addresses contain 32 bits. The subnet mask separates these bits into a network portion and a host portion.

The calculator determines the network address by applying a bitwise AND operation to the IP address and subnet mask. It then uses the remaining host bits to calculate the subnet’s address range.

The total number of addresses is calculated using:

Total addresses = 2^(32 − CIDR prefix length)

For example, a /26 prefix leaves 6 host bits.

2^6 = 64 total IPv4 addresses.

In a conventional subnet, subtracting the network and broadcast addresses gives 62 usable host addresses.

There are two important special cases:

A /31 subnet: It contains two addresses, both of which can be used for endpoints on supported point-to-point connections. It does not use the conventional separate directed-broadcast address.

A /32 subnet: It identifies a single IPv4 address, commonly used as a host route. It has no separate broadcast address.

When Is an IPv4 Subnet Calculator Useful?

An IPv4 subnet calculator is useful when you need to determine whether devices belong to the same IP network or plan how to divide an address range.

For example, when configuring a home router in Pakistan, you may encounter private addresses beginning with 192.168, 10, or 172.16 through 172.31. The calculator helps determine which network range contains a specific address.

Network administrators can also use subnet calculations to plan smaller networks for separate departments, devices, or router interfaces.

Remember that the calculated host capacity is theoretical. A router’s DHCP configuration, reserved addresses, firewall policies, and the network’s actual design determine which addresses can be assigned.

Important Calculator Limitations

This tool performs mathematical IPv4 subnet calculations. It does not scan your network, identify your public IP address, discover connected devices, or check whether an address is reachable.

The calculator’s own calculations run in your browser without requiring a third-party API. Other scripts or services on the surrounding website operate independently.

The tool supports IPv4 addresses only, not IPv6. Its address counts do not automatically exclude every special-purpose or reserved IPv4 range.

For technical reference, consult RFC 4632: Classless Inter-Domain Routing, RFC 3021: 31-Bit Prefixes, and the IANA IPv4 Special-Purpose Address Registry.

Use the calculator whenever you need to verify a subnet mask, identify a network boundary, or determine an IPv4 address range before configuring your network.

Leave a Comment