Subnet Calculator

Calculate network address, broadcast address, usable host range, and subnet mask from any CIDR notation. Free, instant, no sign-up.

IP & CIDR

/24
Class CPrivate

Network

192.168.1.0/24

256

Total IPs

254

Usable Hosts

192.168.1.1

First Host

192.168.1.254

Last Host

Details

Network Address
192.168.1.0
Broadcast Address
192.168.1.255
Subnet Mask
255.255.255.0
Wildcard Mask
0.0.0.255
Usable Host Range
192.168.1.1 – 192.168.1.254
CIDR Notation
192.168.1.0/24

Binary

IP Address11000000.10101000.00000001.00001010
Subnet Mask11111111.11111111.11111111.00000000
Network11000000.10101000.00000001.00000000

Split Into Subnets

Number of subnets

Rounded up to 4 subnets of /26 each (64 addresses per subnet).

#NetworkUsable Range
1192.168.1.0/26192.168.1.1 – 192.168.1.62
2192.168.1.64/26192.168.1.65 – 192.168.1.126
3192.168.1.128/26192.168.1.129 – 192.168.1.190
4192.168.1.192/26192.168.1.193 – 192.168.1.254

100% client-side — nothing you enter here is sent to a server.

CIDR Quick-Reference Chart

Every common prefix from /8 to /32, with its subnet mask and host counts.

CIDRSubnet MaskTotal IPsUsable Hosts
/8255.0.0.016,777,21616,777,214
/9255.128.0.08,388,6088,388,606
/10255.192.0.04,194,3044,194,302
/11255.224.0.02,097,1522,097,150
/12255.240.0.01,048,5761,048,574
/13255.248.0.0524,288524,286
/14255.252.0.0262,144262,142
/15255.254.0.0131,072131,070
/16255.255.0.065,53665,534
/17255.255.128.032,76832,766
/18255.255.192.016,38416,382
/19255.255.224.08,1928,190
/20255.255.240.04,0964,094
/21255.255.248.02,0482,046
/22255.255.252.01,0241,022
/23255.255.254.0512510
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.25422
/32255.255.255.25511

Free IP Subnet & CIDR Calculator

Subnetting math is simple in theory — it's all binary AND/OR operations — but easy to get wrong by hand, especially with edge cases like /31 point-to-point links or /32 host routes. This calculator handles the full range from /0 to /32 correctly, converts between CIDR prefix and dotted-decimal subnet mask in either direction, and works out the network address, broadcast address, and usable host range instantly.

How Subnet Calculations Work

🌐 Network Address

The IP address with every host bit set to 0 — found by ANDing the IP address with the subnet mask.

📡 Broadcast Address

The IP address with every host bit set to 1 — found by ORing the network address with the wildcard mask (the inverted subnet mask).

👥 Usable Hosts

Every address in the range except the network and broadcast addresses — calculated as 2^(host bits) − 2 for most subnets.

🔀 CIDR Prefix

The number of leading 1 bits in the subnet mask — a /24 mask (255.255.255.0) has 24 leading 1 bits, leaving 8 bits for hosts.

Special Cases: /31 and /32

Most subnets reserve their first address (network) and last address (broadcast), leaving the rest usable. Two prefixes break that pattern: a /32 identifies exactly one host with no network or broadcast concept at all, and a /31, defined by RFC 3021, is used almost exclusively for point-to-point links — both of its two addresses are usable, since there's no need for a broadcast address on a link with only two endpoints. This calculator applies those rules automatically rather than always subtracting two hosts.

Frequently Asked Questions

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation combines an IP address with a slash and a number, like 192.168.1.0/24, where the number is how many leading bits of the address are the fixed network portion — the rest identify hosts within that network.

How do I calculate the number of usable hosts in a subnet?

Usable hosts is 2^(32 − prefix length) − 2 for most subnets, since the first address is reserved as the network address and the last as the broadcast address. A /24 has 2^8 − 2 = 254 usable hosts. /31 and /32 are special cases with their own rules.

What's different about a /31 or /32 subnet?

A /32 identifies a single host with no network or broadcast concept. A /31, per RFC 3021, is used for point-to-point links and has no reserved network or broadcast address — both of its two addresses are usable.

How is the broadcast address calculated?

The broadcast address is the network address with every host bit set to 1 — equivalent to the network address OR'd with the wildcard mask (the inverse of the subnet mask).

What's the difference between a public and private IP address?

Private IP addresses (like 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16) are reserved for use inside local networks and aren't routable on the public internet. Any address outside those reserved ranges (and outside loopback and link-local ranges) is considered a public, internet-routable address.

Explore More Free Developer Tools

The Subnet Calculator is part of Texterfly's growing collection of free developer tools — no sign-up, nothing uploaded to a server.

All Developer Tools

Explore All Tools

134 free tools — no signup required

All 134 tools are free · No signup · No ads