IPv4 and IPv6 subnet calculator

Find the network, address range, subnet mask and address count from an IP address and CIDR prefix. Includes IPv4 point-to-point networks and IPv6.

Processed in your browser: your data are not uploaded.

Set your data

Set your data

A prefix included in the IP address overrides the CIDR field.

Accepts literal IPv4 and IPv6 addresses, not domains, URLs or zone identifiers. IPv6 address counts do not indicate how many devices can actually be assigned. No network scan is performed.

Result

Enter your values to see the result.

We count which tools are used most, without including entered values or file contents in the statistics. Privacy

How to use it

Enter an IP address and prefix, separately or as 192.168.1.42/24. An included prefix overrides the separate field.

Method

The mask divides network bits from host bits. IPv4 normally excludes network and broadcast from usable hosts; /31 provides two point-to-point endpoints and /32 one address. IPv6 has no broadcast.

N = 2 b − p

Reading the result

The range describes the CIDR block, not occupied or reachable addresses. The IPv6 total is exact but also includes addresses with reserved roles; it is not an assigned-host count.

Worked example

Input
192.168.1.42/24
Result
192.168.1.0/24 · 192.168.1.1–192.168.1.254 · 254

Calculation steps

  1. CIDR prefix

    32 − 24 = 8
  2. Total addresses

    2 8 = 256
  3. Usable addresses

    256 − 2 = 254

The mask divides network bits from host bits. IPv4 normally excludes network and broadcast from usable hosts; /31 provides two point-to-point endpoints and /32 one address. IPv6 has no broadcast.

Limits and data handling

Accepts literal IPv4 and IPv6 addresses, not domains, URLs or zone identifiers. IPv6 address counts do not indicate how many devices can actually be assigned. No network scan is performed.

Processing takes place in your browser. The tool does not save the values you enter.

Sources

Frequently asked questions

Can I see which addresses are in use?

The range describes the CIDR block, not occupied or reachable addresses. The IPv6 total is exact but also includes addresses with reserved roles; it is not an assigned-host count. Processing takes place in your browser. The tool does not save the values you enter.

Favorites