IP Subnet Calculator – Find Subnets, Masks and IP Ranges

Find the network, broadcast, mask and host range for an IPv4 subnet.

IP Subnet Calculator What is this? ↓
About the IP Subnet Calculator

What is the IP Subnet Calculator?

An IP subnet calculator takes an IPv4 address and CIDR prefix and returns the network address, subnet mask, broadcast address and usable host range.

Why use this calculator?

Network engineers configure routers, firewalls and DHCP scopes with subnet information every day, and the bit maths is easy to botch by hand.

How to use it

  1. Enter an IPv4 address.
  2. Enter the CIDR prefix length (for example 24 for a /24).
  3. Read the derived network details.

Formula

The prefix sets the mask; network = IP AND mask, broadcast = network OR NOT mask.
A /24 gives 256 addresses, of which 254 are usable for hosts; /31 and /32 are special cases.
Frequently Asked Questions
What does /24 mean?
It means the first 24 bits are the network portion, giving 256 addresses and a subnet mask of 255.255.255.0.
Why two fewer hosts than addresses?
The network and broadcast addresses cannot be assigned to hosts, so a /24 has 254 usable addresses.
How precise are the conversions?
Conversions use standard, internationally defined factors and are rounded for display. They are accurate to the number of digits shown.
Can I convert back and forth without losing accuracy?
Yes. Enter the original value to get an exact inverse conversion; avoid chaining rounded results if you need maximum precision.
Which measurement system is used?
Both metric (SI) and US customary / imperial units are supported and clearly labelled.
Is this calculator free to use?
Yes. Every calculator on this site is completely free, with no hidden fees, no subscriptions and no limits on how many times you can use it.
How accurate are the results?
We use standard, widely accepted formulas and calculate in your browser using double-precision arithmetic. Results are rounded for readability, so treat them as reliable estimates rather than a guarantee. Real-world factors can vary the true figure.
Can I add this calculator to my own website?
Yes. Open this calculator page and use the "Add to your website" box in the sidebar to copy a ready-made iframe snippet, then paste it into any HTML page.
Does it work on a phone or tablet?
Yes. The layout is fully responsive, so it works on desktops, laptops, tablets and mobile phones, and every input adapts to touch screens.
Is the information I type kept private?
Yes. All calculations run locally in your browser. Nothing you enter is uploaded, stored or shared with anyone.

Related reading: Guides & How-tos

All articles →