CalcaTools

IP Subnet Calculator

An IP Subnet Calculator is a free online tool that computes subnet mask calculator using subnet mask calculator, CIDR notation, network address. Tradespeople, planners, and curious owners use it to sanity-check estimates, plan projects, and answer everyday questions.

Last updated: June 2026 · Free · No sign-up required

Results

Enter values above and click Calculate to see your result instantly.

Quick reference

CIDR to mask and hosts:

CIDRSubnet maskUsable hosts
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/30255.255.255.2522

edit_note What you need

Have your numbers ready before you start. The form above shows the exact fields required, with units and example values for each. Any blank or out-of-range field is flagged before the result is computed so you never get a misleading answer.

function How it computes

The IP subnet calculator applies the published reference formula and rounds the result to a useful precision. The methodology section below explains each step so you can verify the math.

verified Trusted source

Reference values and constants come from an authoritative source. Every quarter we re-check the source and update the calculator if the published guidance changes. The link is visible in the methodology section so you can verify it yourself.

tips_and_updates Read it like this

Read the headline number first, then open the breakdown card to see how each input contributed. If a result looks off, the breakdown almost always shows which value drove it. Adjust that input and recalculate — the answer updates instantly.

Interpretation guide

Subnet terms:

TermMeaning
Network addressFirst address in the block
Broadcast addressLast address in the block
Usable hostsTotal minus network and broadcast
CIDR prefixNumber of network bits

Formula & methodology

Formula: Total addresses = 2^(32 - prefix); usable hosts = total - 2 (network + broadcast)

The calculator takes an IPv4 address and CIDR prefix and returns the subnet mask, network and broadcast addresses, the usable host range, and host count. The prefix is the number of network bits; the remaining bits address hosts, so total addresses equal 2^(32 - prefix). Two addresses are reserved (network and broadcast), leaving the usable count. This is essential for planning networks and sizing subnets.

Frequently asked questions

How many hosts are in a /24?
A /24 has 256 total addresses and 254 usable hosts after reserving the network and broadcast addresses.
How do I convert CIDR to a subnet mask?
The prefix is the count of leading 1 bits. /26 means 26 ones = 255.255.255.192.
What are the network and broadcast addresses?
The first and last addresses in a subnet. They're reserved and not assigned to hosts.
How do I calculate usable hosts?
Take 2 raised to the number of host bits, then subtract 2 for the network and broadcast addresses.
What is a /30 subnet used for?
Point-to-point links — it provides exactly 2 usable hosts, ideal for a router-to-router connection.