IP Subnet Calculator

Calculate an IPv4 CIDR network, mask, broadcast address and usable host range.

Your numbers

Live

Instant result. Updates while you type.

Your result

Updated now
—

Enter your numbers.

IPv4 subnet calculator for CIDR, masks and host ranges

Enter an IPv4 address and CIDR prefix. HitEquals returns the network, subnet mask, wildcard mask, broadcast address, total addresses and conventional usable range immediately.

Editorial checkCIDR block arithmetic checked against RFC 4632 and /31 handling checked against RFC 3021.Updated September 10, 2026Read the publication standard

Inputs used by this calculator

IP Subnet Calculator uses the fields below. The starting values reproduce the page example; replace them with values from the same units and time period before using the result.

Field-by-field reference for IP Subnet Calculator.
InputStarting exampleAccepted valueHow it is used
IPv4 address192.168.1.10Text in the format shownSupplies the ipv4 address quantity used by the published equation or result breakdown.
CIDR prefix length240 to 32Supplies the cidr prefix length quantity used by the published equation or result breakdown.
Thirty-two bits split into network and host partsThe prefix fixes the leading bits. Every remaining bit contributes to the address count inside the CIDR block.1IPv4 address2CIDR prefix3Network range
Thirty-two bits split into network and host partsThe prefix fixes the leading bits. Every remaining bit contributes to the address count inside the CIDR block.

What CIDR notation means

IPv4 addresses contain 32 bits. A prefix such as /24 says the first 24 bits identify the network while eight bits remain for addresses inside that block.

Subnet formulas

The total address count doubles each time the prefix becomes one bit shorter. A bitwise AND between the address and mask produces the network address.

addresses=2^(32−prefix)network=address AND maskbroadcast=network OR wildcard mask

Worked /24 example

For 192.168.1.10/24, the mask keeps the first three octets. The resulting block begins at 192.168.1.0 and contains 256 addresses through 192.168.1.255.

Usable hosts and reserved endpoints

Traditional /0 through /30 IPv4 subnets reserve the all-zero host address for the network and the all-one host address for broadcast. That leaves two fewer conventional hosts than total addresses.

Why /31 and /32 are special

RFC 3021 permits both addresses of a /31 on a point-to-point link. A /32 identifies one address, often as a host route; neither case follows the traditional subtract-two rule.

Use the result in context

A calculated block does not configure a router, assign DHCP ranges or prove that an address is public. Check the routing design, private-address policy and device documentation before applying changes.

Common IPv4 prefixes

Conventional usable hosts subtract network and broadcast endpoints through /30.
PrefixMaskTotal addressesConventional usable
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/24255.255.255.0256254
/30255.255.255.25242
/31255.255.255.25422 on point-to-point
/32255.255.255.25511 host route

Frequently asked questions

How many addresses are in a /24?

A /24 contains 256 total IPv4 addresses.

Why are two addresses often unavailable?

Traditional subnets reserve the network and broadcast endpoints.

Can a /31 have usable addresses?

Yes. RFC 3021 defines /31 use for point-to-point links.

What is a wildcard mask?

It is the bitwise inverse of the subnet mask.

Does this support IPv6?

No. This calculator is specifically for 32-bit IPv4 addresses.

Does the calculator change my network?

No. It only performs local address arithmetic in the browser.

What to keep in mind

The usable-host count follows conventional subnetting for /0 through /30 and point-to-point or single-host interpretations for /31 and /32. Actual routing and address policy depend on the network.

Results are rounded for display in US format, with money in dollars and cents; CSV exports keep full calculation precision. This is a calculation summary, not an official certificate.

Sources and references

Manage privacy choices