MyCalCute
Install
Calculators / Technology / IPv4 subnet

IPv4 subnet calculator

Calculate address counts and mask information from an IPv4 prefix length.

On this page

Your result

Subnet mask255.255.255.0
Total addresses256
Traditional usable hosts254

Calculator controls

How to calculate

Calculate address counts and mask information from an IPv4 prefix length.

Total addresses = 2^(32−prefix); mask contains prefix one-bits followed by zero-bits.

Worked example

CIDR prefix length: 24.

Subnet mask: 255.255.255.0 ; Total addresses: 256 ; Traditional usable hosts: 254 .

Assumptions and limits

Usable-host conventions differ for /31 and /32 networks. This tool describes IPv4 only and does not allocate a network address.

Results are rounded for display; calculations use unrounded values. Read our calculation methodology.

Understanding the result

Calculate address counts and mask information from an IPv4 prefix length. The displayed figures use the inputs and formula shown on this page.

When this tool is useful

Use the ipv4 subnet to compare a scenario, check an estimate, or verify a manual calculation.

Understanding your inputs

InputWhat to enter
CIDR prefix lengthEnter a number of at least 0 and no more than 32.

Frequently asked questions

What should I check before using the ipv4 subnet result?

Usable-host conventions differ for /31 and /32 networks. This tool describes IPv4 only and does not allocate a network address.

Is this ipv4 subnet result exact?

It is exact for the stated mathematical model and entered values. Real-world results can differ when rates, timing, fees, definitions or measurement conditions differ.