Premium calculator

IP Subnet Calculator

Calculate IPv4 network address, broadcast address, subnet mask, wildcard mask, usable host range and address count from an IP and CIDR prefix.

  • IPv4 address + CIDR prefix input
  • Network, broadcast, mask and wildcard results
  • Correct handling for /31 point-to-point and /32 host routes
Digital & Technology

Calculator workspace

Enter the known values, calculate, and review the supporting figures and formula instead of relying on a single unexplained number.

🔒 Browser-only calculation
Enter 0 through 32, for example 24 for a /24 subnet.

What this IP Subnet Calculator does

IPv4 subnetting divides the 32-bit address space into a network portion and a host portion. This calculator accepts a familiar dotted-decimal IPv4 address and CIDR prefix, then shows the network address, broadcast address, subnet mask, wildcard mask, total address count, usable endpoint range and host-bit count. It is designed for quick network planning, documentation, troubleshooting and subnetting study without sending the entered address to a server.

The workspace is designed for quick checking as well as repeatable planning. Inputs remain editable, the supporting figures are shown with the headline result, and the calculation runs locally in the browser. That makes it easy to change one assumption at a time, compare scenarios and copy or save a result together with the values that explain it.

Formula and calculation method

Network = IP AND subnet mask; broadcast = network OR wildcard; total addresses = 2^(32 − prefix).

The CIDR prefix creates a 32-bit mask with the selected number of leading 1 bits. The network address is calculated with a bitwise AND between the IP address and subnet mask. The wildcard mask is the inverse of the subnet mask, and the broadcast address is the network address OR the wildcard. For prefixes /0 through /30, traditional usable-host counting excludes network and broadcast addresses. /31 is treated as a two-address point-to-point subnet, and /32 as a single host route.

How to use the calculator

  1. Choose the calculation mode, shape, unit or known-value combination when the page provides one.
  2. Enter values that belong to the same problem or measurement scenario and keep units consistent with the field labels.
  3. Select Calculate and review both the main answer and the supporting metrics shown with it.
  4. Change one assumption at a time when comparing scenarios; this makes the effect of each input easier to understand.
  5. Use Copy Result, Share Result or Save Result Image when you need a portable record of the calculation.

Worked example

For 192.168.10.42/24, the subnet mask is 255.255.255.0, the network is 192.168.10.0 and the broadcast is 192.168.10.255. There are 256 total addresses and 254 traditional usable host addresses, ranging from 192.168.10.1 through 192.168.10.254.

Advertisement

How to interpret the result

The calculator also labels common address categories such as RFC1918 private IPv4 ranges, loopback and link-local space. That label describes the entered address, not whether a route is reachable from a particular network. Subnet math determines address boundaries; routing tables, VLANs, firewalls, NAT, DHCP and provider allocations determine how those addresses actually behave in an environment.

A calculator result is only as useful as the values entered. For measurements, use appropriately precise source data; for costs, use prices that match the same currency and period; for technical work, compare the output with drawings, equipment data or other authoritative information. The supporting metrics on this page are included specifically to make cross-checking easier.

Important assumptions and limitations

This page is an IPv4 calculator and does not currently perform IPv6 prefix arithmetic. It does not test whether an address is live, scan a network, query DNS or inspect any connected interface. Address counts can be very large for short prefixes; JavaScript can represent all IPv4 subnet counts exactly because the maximum 2³² remains within safe integer precision.

This calculator is provided for planning, checking, education and general informational use. It makes the formula and assumptions visible, but it does not replace project specifications, professional engineering, financial or medical advice, contractual documents, equipment ratings or applicable standards.

Frequently asked questions

What does /24 mean?

A /24 prefix means the first 24 bits identify the network and the remaining 8 bits are available for addresses within that subnet.

Why does /31 show two usable endpoints?

Modern point-to-point IPv4 links can use both addresses in a /31 under RFC 3021 rather than reserving traditional network and broadcast endpoints.

Does this calculator scan my network?

No. It performs local subnet arithmetic only and does not send probes or query network devices.

Related calculators