IP Subnet Calculator

Network address

192.168.1.0

Subnet mask

255.255.255.0

All results
Calculator inputs
?

Four-octet address lying within the subnet to be calculated; it need not already be the network boundary.

?

Count of network bits out of the 32-bit IPv4 address; remaining bits identify addresses inside the block.

How to use the IP Subnet Calculator

Calculate IPv4 network, mask, broadcast and usable-host range, including /31 and /32.

  1. 1. Enter your inputs

    Start with IPv4 address, CIDR prefix length. Use the units shown beside each field.

  2. 2. Read the results

    Results update as you enter valid values. Review Network address, Subnet mask, Last address (broadcast for /0–/30). Keep the entered units and settings consistent when comparing scenarios.

  3. 3. Check the calculation

    Network=address AND mask. /31 uses both addresses for a point-to-point link (RFC 3021); /32 identifies one host. Other prefixes reserve network and broadcast addresses.

    See the worked example and method

Understanding the IP Subnet Calculator: uses, inputs and results

The IP Subnet Calculator makes IPv4 address boundaries visible for a chosen CIDR prefix, including the supported /31 and /32 cases.

What does an IPv4 CIDR prefix tell me?

An IPv4 address contains 32 bits. The CIDR prefix identifies how many belong to the network portion, with the remainder defining addresses inside that block. Applying the mask finds the network boundary. The address supplied can be inside the block rather than already being its first address.

Why are /31 and /32 special cases?

The usual network-and-broadcast subtraction used for ordinary subnets does not describe every prefix. A /31 point-to-point convention and a /32 single-address route need their supported special handling. The arithmetic identifies address ranges; it does not configure routing, check reachability or discover the user’s actual network.

What do the IP Subnet Calculator inputs mean?

IPv4 address
Four-octet address lying within the subnet to be calculated; it need not already be the network boundary.
CIDR prefix length
Count of network bits out of the 32-bit IPv4 address; remaining bits identify addresses inside the block.

When is the IP Subnet Calculator useful?

Check a network range

Enter an IPv4 address and prefix to inspect its network, broadcast and usable-host range.

Compare prefix sizes

Change the prefix to understand address allocation. Special point-to-point and single-address cases follow their stated conventions.

IP Subnet Calculator: a practical reference

The fixed “/24 subnet” example on this page produces the results below. It illustrates the stated model; your live results above use your current inputs.

IPv4 address
192.168.1.42
CIDR prefix length
24
Network address
192.168.1.0
Subnet mask
255.255.255.0
Review the example inputs and calculation

Try the IP Subnet Calculator·Read the subject guide·Explore a related calculator

Worked example: IP Subnet Calculator

/24 subnet. This fixed reference example shows one complete scenario; the interactive results above use your current inputs.

View the example inputs
IPv4 address
192.168.1.42
CIDR prefix length
24
Calculated results for the fixed example
Calculated quantityExample result
Network address192.168.1.0
Subnet mask255.255.255.0
Last address (broadcast for /0–/30)192.168.1.255
Usable host addresses254
First usable address192.168.1.1
Last usable address192.168.1.254

Using technical conversions and generated data correctly

Confirm the representation before converting

Technical values need a defined format as well as a number. Bits and bytes differ by a factor of eight. Decimal storage prefixes and binary prefixes differ in their powers. Network prefixes, text encodings and percent-encoded URL components each have their own syntax and boundaries.

An encoding changes representation rather than making data secret. Unicode text needs a defined character encoding, and not every decoded byte sequence is valid text. A subnet calculation describes address ranges but does not establish a network’s live configuration.

Use the output for its documented purpose

Transfer-time estimates assume a usable throughput rather than a guaranteed line speed. Random generators use independent draws, so a repeated result can be valid. Generated passwords should be handled as secrets when you choose to use them.

Read the supported mode, size limits and error message before reformatting an input. The worked example illustrates the representation or arithmetic, and the current result updates from the actual values in the form.

Formula and calculation method

Network=address AND mask. /31 uses both addresses for a point-to-point link (RFC 3021); /32 identifies one host. Other prefixes reserve network and broadcast addresses.

Reference Sources

Frequently asked questions

How does this calculator work?

Network=address AND mask. /31 uses both addresses for a point-to-point link (RFC 3021); /32 identifies one host. Other prefixes reserve network and broadcast addresses.

What assumptions should I check?

Check the units and definitions shown beside each input. Results use the values you enter.

Can I save or print this calculation?

Use Copy link with inputs to reproduce the scenario, Download results for a text record, or Print. Where a schedule is shown, its CSV download includes every row.