AI Tools Free

IPv4 Subnet Calculator

Calculate an IPv4 subnet mask and IP address range from a dotted-decimal address and CIDR prefix. Review network boundaries and total or usable addresses.

Free to useNo sign-upRuns in your browser
Enter your details

Update the inputs to see your result.

Your result
Enter your details

Result will appear here

How IPv4 Subnet Calculator works

The CIDR mask identifies the IPv4 network block and its endpoints.

The prefix sets the leading subnet-mask bits. A bitwise AND determines the network address, and the inverse mask determines the last address. Ordinary subnet usable ranges exclude the endpoints; /31 and /32 use the page’s stated special cases.

For ordinary subnets, the first and last addresses are reserved. /31 is treated as a two-address point-to-point link under RFC 3021; /32 is a single host route.

Reference: RFC 3021: 31-bit IPv4 prefixes.

Conceptual IPv4 address and CIDR mask determining a network address range.
The prefix controls the subnet mask and the size of the address block.

IPv4 Subnet Calculator Quick Reference & Input Guide

Review the input parameters, allowed value ranges, and worked reference cases for the IPv4 Subnet Calculator below before running your calculation.

Parameter / ScenarioDefault / Sample ValueRule or Allowed RangeOutput / Usage Note
Input: IPv4 address192.168.1.10Input type: textRequired workspace parameter
Input: CIDR prefix length24Range: 0 to 32Required workspace parameter

How to use IPv4 Subnet Calculator

Enter an IPv4 address separately from its CIDR prefix length.

Set the IPv4 address and prefix

Enter the dotted-decimal IPv4 address and a whole-number CIDR prefix from zero to 32. Keep the prefix separate from the address field. This form handles local address arithmetic and does not scan, allocate, or validate a live network.

IPv4 address
IPv4 Subnet Calculator native input panel with the actual IPv4 address, CIDR prefix length settings used for this example.
Configure IPv4 address, CIDR prefix length; select Calculate.

Calculate the network block

Select Calculate and read the IPv4 network address with its prefix. The subnet mask determines which bits define the network. Compare a second prefix on the same address if you want to inspect how the block boundaries change.

192.168.1.10/32
IPv4 Subnet Calculator actual result panel showing 192.168.1.10/32.
Submitted result: 192.168.1.10/32. Subnet mask: 255.255.255.255.

Check boundaries and usable addresses

Review Subnet mask, Last address, Usable range, and address counts. Ordinary subnets reserve the first and last addresses. Read the separate /31 and /32 notes before applying that ordinary rule to a point-to-point block or a host route.

Subnet mask
IPv4 Subnet Calculator actual subnet mask region and result note after submitting the pictured settings.
Review Subnet mask, Last address, Usable addresses in this IPv4 Subnet Calculator example. Read the result note.

Find IPv4 network addresses and compare CIDR blocks

Compare baseline and alternative runs for IPv4 Subnet Calculator before exporting the result.

Find the network address for an IPv4 address

A hypothetical address 192.168.1.42 with prefix twenty four belongs to network 192.168.1.0/24. The result also shows the mask and boundaries. This helps check a supplied address and prefix before comparing them with an existing network configuration.

Developer input and configuration represented by document cards.
Prepare the input. Concept illustration.

Compare prefix lengths

Run the same address with different prefixes and inspect the changed total and usable counts. This makes block size assumptions visible. The tool does not assess routing policy, allocate blocks or determine which prefix should be used for a particular deployment.

A developer example flowing from input to reviewed output.
Inspect an example. Concept illustration.

Inspect the special small blocks

A thirty one bit prefix follows the two address point to point convention, while thirty two bits describe one host route. Review those notes with the usable range. Applying the ordinary first and last address reservation would misread these two cases.

Developer output handed to the next stage of a workflow.
Use the result in your workflow. Concept illustration.

Subnet mask, total addresses, and usable IP range

Review the calculated output alongside your entered parameters and unit conventions.

Every calculation follows the rule: Subnet mask has the first prefix bits set. Network = address AND mask; last address = network OR inverse mask. Because JavaScript uses IEEE 754 double-precision floating-point arithmetic, numeric outputs display up to 12 significant digits where applicable.

Always cross-check the displayed result against the scope note (For ordinary subnets, the first and last addresses are reserved. /31 is treated as a two-address point-to-point link under RFC 3021; /32 is a single host route) before applying the value to production specifications, financial models, or lab records.

A developer result reviewed alongside its source.
Review the returned output. Concept illustration.

Check syntax and the intended network convention

Check address notation and special small-block behaviour before using the range.

Operational scope: For ordinary subnets, the first and last addresses are reserved. /31 is treated as a two-address point-to-point link under RFC 3021; /32 is a single host route. Inputs that violate minimum/maximum bounds or required format rules are rejected with a clear diagnostic prompt.

Need an adjacent calculation in Developer Tools? Use the related tools linked below to chain your workflow without leaving your browser.

Input format and assumptions reviewed for a developer task.
Check format and assumptions. Concept illustration.

Frequently Asked Questions About IPv4 Subnet Calculator

Answers about using IPv4 Subnet Calculator and understanding its results.

Why does /31 show two usable addresses?

RFC 3021 allows both addresses on a point-to-point link.

Does this support IPv6?

No. This tool accepts IPv4 dotted-decimal addresses only.

What does the total-address count include?

It counts every address in the prefix block. Ordinary subnets reserve the first and last addresses, so usable count is smaller than total count.

Does this check whether an address is in use?

No. The calculation is local address arithmetic. It does not scan a network, allocate addresses, or check routing.

Use IPv4 Subnet Calculator

Choose another tool for your next calculation, conversion, or text task.

Calculate