Enter any IPv4 address with a CIDR prefix or mask below — get network, broadcast, usable host range, and masks instantly.

Free Subnet Calculator — Network, Broadcast & Host Range | syedwaleed.com
Home › Developer Tools › Subnet Calculator

Subnet Calculator

Type any IPv4 address and a CIDR prefix or subnet mask — get the network address, broadcast address, usable host range, host counts, wildcard mask, and binary breakdowns. Instant, accurate, and private.

The subnet accepts CIDR notation (/24), a bare prefix (24), or a dotted mask (255.255.255.0). Everything calculates live as you type.

Network address
Broadcast address
CIDR notation
First usable host
Last usable host
Usable host range
Subnet mask
Wildcard mask
Total / usable hosts

Binary breakdown

IP address
Subnet mask
Network
Broadcast

Quick subnet cheat sheet

CIDRSubnet maskTotal addressesUsable hosts
100% private

All subnet math runs in your browser. No IP data is sent anywhere or logged.

No signup

Calculate subnets instantly — no account, no email, no limits.

Free forever

Every feature, from binary breakdowns to the cheat sheet, is free.

How to use the subnet calculator

  1. 1Enter the IP address

    Type any IPv4 address, for example 192.168.1.10 or 10.0.0.5. Invalid octets are flagged instantly.

  2. 2Enter the subnet

    Use CIDR notation (/24), a bare prefix (24), or a dotted mask (255.255.255.0) — all three work.

  3. 3Read the results

    Network, broadcast, first and last usable hosts, host counts, masks, and the binary breakdown appear immediately.

  4. 4Copy or consult the cheat sheet

    One click copies the full result as text; the /24–/30 cheat sheet covers the most common subnets.

Why network folks use this calculator

Three mask formats in

CIDR (/24), bare prefix (24), and dotted mask (255.255.255.0) are all accepted — paste whatever your docs use.

Binary breakdowns

See the IP, mask, network, and broadcast in binary with network bits highlighted, so the math is visible, not magic.

/31 and /32 handled correctly

Point-to-point /31 subnets get 2 usable hosts (RFC 3021) and single-host /32 routes get 1 — no off-by-one surprises.

Friendly error messages

“300.1.1.1” gets a clear explanation of what’s wrong, not a blank page or a cryptic error code.

Built-in cheat sheet

The /24 through /30 reference table answers “how many hosts in a /27?” without reaching for another tab.

Subnet calculator FAQs

What is a subnet mask?
A subnet mask splits an IPv4 address into a network part and a host part. In /24 (255.255.255.0), the first three octets identify the network and the last octet identifies hosts — giving 254 usable addresses.
What’s the difference between the network and broadcast address?
The network address (all host bits 0) names the subnet itself, and the broadcast address (all host bits 1) reaches every host on it. Neither can be assigned to a device, which is why a /24 yields 254 usable hosts, not 256.
How many usable hosts does my subnet have?
Usable hosts = 2^(32 − prefix) − 2. A /24 has 254, a /28 has 14, and a /30 has 2. The two subtracted addresses are the network and broadcast addresses.
What are /31 and /32 subnets for?
A /31 has just 2 addresses and is used for point-to-point links between routers (RFC 3021 treats both as usable). A /32 identifies a single host — used in routing tables and firewall rules. This calculator handles both edge cases.
What is a wildcard mask?
The wildcard mask is the inverse of the subnet mask (each octet subtracted from 255). It’s used in access-control lists on Cisco routers and in some firewall rules — for /24 it’s 0.0.0.255.
Can I enter a dotted mask instead of CIDR?
Yes. The subnet box accepts /24, a bare 24, or 255.255.255.0. Any valid contiguous mask converts to its CIDR prefix automatically.
Is my IP address sent to a server?
No. Every calculation happens in JavaScript in your browser tab. The IP you type is never transmitted, stored, or logged.
Scroll to Top