Everyday · FREE ONLINE TOOL

IP Subnet Calculator

Calculate IPv4 or IPv6 subnet ranges from CIDR prefixes, or validate a contiguous IPv4 dotted mask and its address capacity.

What would you like to calculate?

Your inputs

How it works

IPv4 subnet

Network = address AND mask; range size = 2^(32−prefix).

/31 follows point-to-point addressing with two usable addresses; /32 identifies one host.

Calculations run in your browser. No account needed.

EXAMPLE RESULTCalculated locally
Network
192.168.1.0/24
Subnet mask
255.255.255.0
Last address
192.168.1.255
Broadcast
192.168.1.255
First usable
192.168.1.1
Last usable
192.168.1.254
Usable range
192.168.1.1 – 192.168.1.254
Total addresses
256
Usable addresses
254
Clear inputs. Transparent methods.
My workspace

Calculate with your inputs to save a result or compare scenarios.

How it works

Illustration for IP Subnet Calculator: a diagram with connected points; a globe and padlock.
IPv4 subnetNetwork = address AND mask; range size = 2^(32−prefix).
A useful distinction

Subdivision uses more reserved addresses

Splitting a conventional IPv4 /24 into two /25 networks preserves 256 total addresses but reduces ordinary host slots from 254 to 252. Each subnet needs its own network and broadcast addresses; total address count is not usable capacity.

How many ordinary host addresses survive a subnet split?

Usable host addresses in total. A (/24) → 254. B (2 × /25) → 252.
How many ordinary host addresses survive a subnet split?
IPv4 prefixCalculationUsable host addresses in total
A /242^8 − 2254
B 2 × /252 × (2^7 − 2)252

Read an address together with its prefix

An IP address identifies a value inside an address space; the prefix determines how many leading bits identify the network. IPv4 has 32 bits and IPv6 has 128. A larger prefix leaves fewer host bits and therefore a smaller address block.

Enter the address and prefix, or use the IPv4 dotted-mask method. A valid dotted subnet mask has contiguous leading one bits followed by zero bits; an arbitrary four-number mask is not necessarily valid.

Worked IPv4 example: 192.168.1.130/26

A /26 prefix leaves six IPv4 host bits, giving 2⁶ = 64 addresses. The address 192.168.1.130 lies in the block starting at .128 and ending at .191. Its mask is 255.255.255.192. Under conventional subnet use, .128 is the network address and .191 is broadcast.

The ordinary host range is .129 through .190, containing 62 addresses. The total block size and the assignable-host count are different quantities.

The /26 example broken into address roles
RoleValue
Network192.168.1.128
First ordinary host192.168.1.129
Last ordinary host192.168.1.190
Broadcast192.168.1.191
Total addresses64
Ordinary host count62

Do not subtract two addresses from every IPv4 prefix

The familiar 2^(32−prefix) − 2 host count is not applied blindly. A /31 uses the labeled point-to-point convention with two usable addresses, and a /32 identifies one host. Your network design and equipment must support the intended use.

A calculated range does not establish that an address is assigned, reachable, permitted by a firewall or available from a provider.

IPv6 uses different address conventions

For 2001:db8::1/64, the prefix leaves 64 lower bits and the block contains 2⁶⁴ addresses. IPv6 has no IPv4-style broadcast address. Do not subtract network and broadcast addresses using an IPv4 rule.

The all-zero interface identifier can have special subnet-router-anycast meaning. A numeric block size is therefore not a universal claim that every value is an ordinary endpoint address.

Use subnet arithmetic separately from address allocation

Changing /24 to /26 splits a 256-address block into four equal 64-address blocks. This calculation explains boundaries; it does not configure routing, DHCP, DNS or security rules.

Keep documentation and operational addresses separate when copying examples. The calculator is a planning and verification tool, not a scan of the network.

IPv4 subnet: formula and assumptions

Network = address AND mask; range size = 2^(32−prefix).

/31 follows point-to-point addressing with two usable addresses; /32 identifies one host.

Use IPv4 subnet

IPv6 subnet: formula and assumptions

Network = address with host bits zeroed; size = 2^(128−prefix).

IPv6 has no broadcast address. The all-zero interface identifier can have special subnet-router-anycast meaning.

Use IPv6 subnet

IPv4 prefix or dotted mask: formula and assumptions

Contiguous leading mask bits select the network prefix.

Dotted masks are validated before applying the same CIDR arithmetic. /31 uses the explicitly labeled point-to-point convention; /32 represents one host.

Use IPv4 prefix or dotted mask

Worked example

Using the IPv4 subnet example:

Inputs
IPv4 address
192.168.1.130
Prefix length
24
Method

Network = address AND mask; range size = 2^(32−prefix).

Result

Example result

Network: 192.168.1.0/24

Subnet mask: 255.255.255.0

Last address: 192.168.1.255

Broadcast: 192.168.1.255

First usable: 192.168.1.1

Last usable: 192.168.1.254

Usable range: 192.168.1.1 – 192.168.1.254

Total addresses: 256

Usable addresses: 254

These are illustrative inputs. Change the values to explore a different scenario.

Formula references

References explain the underlying methods; they do not imply endorsement or individual professional review of Finflo.

Common questions

What does /26 mean?

It reserves 26 leading IPv4 bits for the network, leaving six host bits and 64 total addresses.

Is the network address the same as my entered host address?

Not necessarily. The calculator clears host bits to find the network boundary containing the entered address.

Why are total addresses and usable hosts different?

Ordinary IPv4 subnets reserve network and broadcast roles, while /31 and /32 use the explicitly stated special conventions.

Can I enter 255.255.255.192 instead of /26?

Yes in the IPv4 dotted-mask method. The mask must have contiguous leading one bits.

Does IPv6 have broadcast addresses?

No. IPv6 addressing does not use the IPv4 broadcast convention.

Can this tell me whether an address is online?

No. It calculates address boundaries and counts without scanning hosts or checking reachability.

See our methodology and editorial policy.