Skip to content
Free Calculator

Subnet Calculator

Calculate Subnet step by step: Network = address AND mask; broadcast = network OR wildcard; usable hosts = 2^(32 − prefix) − 2.

In short

Formula: Network = address AND mask; broadcast = network OR wildcard; usable hosts = 2^(32 − prefix) − 2.

Press Calculate, or Enter in any field.

A /24 home network

192.168.1.10/24.

Complete the required fields to see the result.

What this calculator does

Calculate Subnet step by step: Network = address AND mask; broadcast = network OR wildcard; usable hosts = 2^(32 − prefix) − 2. Worked example, questions and limitations included.

Use it to turn IPv4 address, Prefix length (CIDR) into a checked result you can compare, copy, or rerun with different assumptions.

The page shows the formula, a numeric worked example, and the assumptions that affect this developer tools calculation.

Inputs and what they mean

IPv4 address
— text value.
Prefix length (CIDR)
— number value.

How to use it

  1. Enter each value in the unit shown next to the box (use the unit converter first if your numbers are in other units).
  2. Check the breakdown to see every intermediate step.
  3. Read the limitations before relying on the result.

Formula

Standard IPv4 classless subnetting (CIDR).

The network and broadcast addresses are reserved, so two addresses are subtracted from the host count.

/31 point-to-point links and /32 host routes are special cases and are labelled as such.

Network = address AND mask; broadcast = network OR wildcard; usable hosts = 2^(32 − prefix) − 2.

Inputs used: IPv4 address, Prefix length (CIDR).

Worked example

A /24 home network

  1. Mask = 255.255.255.0.
  2. Network = 192.168.1.0, broadcast = 192.168.1.255.
  3. Usable hosts = 2⁸ − 2 = 254.

Reading the result

The headline figure is the main answer. Any breakdown underneath shows the parts that make it up, so you can check the working and see what changes when you adjust an input.

Limitations and assumptions

  • IPv4 only.
  • Does not plan or split networks into multiple subnets.
  • Host counts ignore any local reservations.
  • Results are computed only from the values you enter. Check the limitations before relying on them.
  • The result depends on the values you enter for this subnet calculator; it does not supply missing rates, rules, prices, dates, or assumptions for you.

Common questions

What does /24 mean?

The first 24 bits are the network part, leaving 8 bits — 256 addresses — for hosts. Check the formula, example, and limitations on this page before using the result for a real developer tools decision.

Why subtract two hosts?

The network address and the broadcast address cannot be assigned to devices. Check the formula, example, and limitations on this page before using the result for a real developer tools decision.

Does it support IPv6?

No, this calculator is IPv4 only. Check the formula, example, and limitations on this page before using the result for a real developer tools decision.

How do I use the Subnet Calculator?

Enter the required values for IPv4 address, Prefix length (CIDR). The calculator applies the formula on this page and shows the main result with any supporting breakdown so you can check the arithmetic.

What formula does the Subnet Calculator use?

Network = address AND mask; broadcast = network OR wildcard; usable hosts = 2^(32 − prefix) − 2. The visible formula section above lists the calculation path and the edge cases the page handles, so the result can be checked without relying on the form alone.

Can the Subnet Calculator be used for exact decisions?

Use it as a calculation aid, not as a substitute for checking the underlying rule, contract, policy, or professional advice that applies to your situation. When a result depends on local rules, personal details, prices, or dates, enter those values yourself and confirm them before acting.

Related tools

Format JSON into clean, readable indentation locally.

Developer Tools

Check JSON syntax and see clear parsing errors locally.

Developer Tools

Remove optional whitespace from valid JSON.

Developer Tools

Encode Unicode text as standard Base64.

Developer Tools

Decode valid Base64 into Unicode text.

Developer Tools

Percent-encode text for use in a URL component.

Developer Tools

People also use