Computing and data

Subnet calculator

Reports conventional subnet host counts, with explicit point-to-point /31 and host-route /32 handling.

Your numbers

Use the units shown. Results update as you change valid inputs.

YOUR RESULT

Reports conventional subnet host counts, with explicit point-to-point /31 and host-route /32 handling.

THE NUMBERS, EXPLAINED

How to use this calculator.

Reports conventional subnet host counts, with explicit point-to-point /31 and host-route /32 handling.

Start with your inputs

Enter ipv4 address, prefix length. Keep amounts in the units shown on each field. The example is a starting point, not a recommended value.

InputExample value
IPv4 address192.168.1.42
Prefix length24

A worked example

With the example inputs above, network details is Network 192.168.1.0/24; broadcast 192.168.1.255; 254 conventional usable hosts. Change the inputs to explore your own scenario.

All results for the example inputs above
ResultExample answer
Network detailsNetwork 192.168.1.0/24; broadcast 192.168.1.255; 254 conventional usable hosts

How this is calculated

Network details

IPv4subnet(a,b)

Symbols and units
a
IPv4 address
b
Prefix length

Use the units shown. A list keeps the order in which you enter its values. The symbol ^ means “raised to the power of”.

Calculation steps and notation

Treat the address as an unsigned 32-bit number. Block size = 2^(32−prefix). Network = floor(address / block size) × block size; broadcast = network + block size − 1. Conventional host count is block size − 2, except /31 has 2 and /32 has 1.

Assumptions and limits

Reports conventional subnet host counts, with explicit point-to-point /31 and host-route /32 handling.

Calculations use the values you enter. Blank or invalid inputs show an error instead of silently substituting zero. Results are displayed to useful precision; calculations retain the underlying numeric precision.

Questions about this tool

What does the result tell me?

Network details. The result applies to the method and inputs described above. Check the units and assumptions before using it in a decision.

Why might another calculator differ?

Differences in units, rounding, timing or model definitions can produce different answers. Compare the input definitions and the method, rather than only the final number. For this tool: Reports conventional subnet host counts, with explicit point-to-point /31 and host-route /32 handling.

Are my inputs stored or sent to AI?

Calculations on this page happen in your browser. The separate AI question finder sends its submitted conversation to OpenAI; these calculator fields are not sent. Favourites and recent tool names are stored locally. A shared link contains the inputs you choose to include.

Review status

Software example and browser checks are recorded in our quality report. No external expert review is claimed. Created with coding assistance; calculations run as ordinary browser code.

Read the quality report →