Skip to content

IP Subnet Calculator

Network, broadcast and host range from any CIDR block.

The block

PropertyValue

In binary

The prefix boundary is where the mask changes from ones to zeros.

Prefix reference

CIDRSubnet maskAddressesUsable hosts

Network address

—

Range

First usable host—
Last usable host—
Broadcast address—
Usable hosts—

Masks

Subnet mask—
Wildcard mask—

—

Address class and scope

A /24 holds 256 addresses but only 254 usable ones, because the first identifies the network and the last is the broadcast address. A /31 is the RFC 3021 point-to-point case where both are usable, and a /32 is a single host route.

Quick Tool Overview

The IP Subnet Calculator takes an IPv4 address and prefix length and returns the whole block: network and broadcast addresses, the usable host range, subnet mask, wildcard mask and host counts, with binary shown so the mask boundary is visible.

What it does
Calculates every property of an IPv4 subnet
You give it
An IP address and a CIDR prefix or subnet mask
You get back
Network, broadcast, host range, masks and counts
Best for
Network planning, firewall rules and studying for exams
Developer Tools Free, unlimited use No sign-up Runs in your browser

About the IP Subnet Calculator

Enter an IPv4 address and a prefix length and get the whole picture: network address, broadcast address, first and last usable host, subnet mask, wildcard mask and how many hosts the block actually holds.

The usable host count is where the arithmetic surprises people. A /24 holds 256 addresses but only 254 usable ones, because the first is the network address and the last is the broadcast address. A /31 is a special case defined for point-to-point links where both addresses are usable, and a /32 is a single host. Binary representations are shown alongside, since seeing where the mask cuts the address is what makes CIDR click.

Key features of the IP Subnet Calculator

Every derived value

Network, broadcast, first and last usable host, subnet mask, wildcard mask and host counts.

Binary view

The address and mask in binary, so you can see exactly where the prefix cuts — which is what makes CIDR click.

Handles /31 and /32

The RFC 3021 point-to-point case and single host routes are treated correctly rather than reported as zero usable hosts.

Mask or prefix

Enter either a CIDR prefix or a dotted subnet mask, and the other follows.

Address class and type

Whether the block is private, loopback, link-local or public, which is the first thing you check.

How to use the IP Subnet Calculator

  1. 1

    Enter an IP address

    Any IPv4 address in dotted decimal form.

  2. 2

    Choose a prefix length

    From /0 to /32, or pick a subnet mask and the prefix follows.

  3. 3

    Read the block

    Network, broadcast, usable range, mask and wildcard.

  4. 4

    Check the binary

    The address and mask in binary, so you can see exactly where the boundary falls.

Frequently asked questions

The first 24 bits are the network portion, leaving 8 bits for hosts. That is a mask of 255.255.255.0, 256 total addresses and 254 usable ones.

Reviews of the IP Subnet Calculator

What people who use the IP Subnet Calculator think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the IP Subnet Calculator. It takes half a minute and no account.

Write the first review

More developer tools