GintiCalcEvery calculation

NetCalc

Subnet Calculator

IP + CIDR prefix in, full subnet details out — network, broadcast, host range.

Subnet mask, host count, and range by CIDR prefix

The prefix says how many bits are network; the rest address hosts. Two addresses in every block are reserved for the network and broadcast, which is why usable hosts is always two fewer than the block size.

CIDRSubnet maskNetworkBroadcastUsable rangeUsable hosts
192.168.1.10/24255.255.255.0192.168.1.0192.168.1.255192.168.1.1 - 192.168.1.254254
192.168.1.10/25255.255.255.128192.168.1.0192.168.1.127192.168.1.1 - 192.168.1.126126
192.168.1.10/26255.255.255.192192.168.1.0192.168.1.63192.168.1.1 - 192.168.1.6262
192.168.1.10/30255.255.255.252192.168.1.8192.168.1.11192.168.1.9 - 192.168.1.102
172.16.5.1/20255.255.240.0172.16.0.0172.16.15.255172.16.0.1 - 172.16.15.2544,094
10.0.0.5/16255.255.0.010.0.0.010.0.255.25510.0.0.1 - 10.0.255.25465,534
10.0.0.5/8255.0.0.010.0.0.010.255.255.25510.0.0.1 - 10.255.255.25416,777,214

Note the /30 row: 192.168.1.10 sits in the block starting at 192.168.1.8, not at .10. The network address is the given IP masked down, which is why the block boundary often surprises people. /30 is the classic point-to-point link size.

How CIDR notation works

A /24 means the first 24 bits are the network portion, leaving 8 bits (2⁸ = 256 addresses, 254 usable hosts) for hosts. Each step down (/25, /26, …) halves the host count. The subnet mask is just those network bits set to 1 — /24 = 255.255.255.0, /16 = 255.255.0.0.

Why subtract 2 from total addresses

The first address in a subnet is the network address (identifies the subnet itself) and the last is the broadcast address (reaches all hosts on the subnet). Neither can be assigned to a device, so usable hosts = 2^(32 − prefix) − 2. A /31 is a special case used for point-to-point links.

Frequently asked questions

I have a /24 subnet — how many devices can I connect?

254 usable host addresses (256 total minus the network address and broadcast address). A /24 gives you addresses x.x.x.1 through x.x.x.254 for devices.

What's the subnet mask for a /24?

255.255.255.0. The first 24 bits are set to 1 (the network portion), and the remaining 8 bits are 0 (the host portion). Each step down halves the hosts: /25 = 255.255.255.128 with 126 hosts, /26 = 255.255.255.192 with 62 hosts.

My office has 50 devices — what CIDR prefix do I need?

A /26 gives 62 usable hosts, which fits 50 devices with a little room. A /25 gives 126 hosts if you want more headroom. Avoid a /24 for just 50 devices unless you expect significant growth — it wastes address space in larger network designs.

What's the difference between a network address and a broadcast address?

The network address (first in the range) identifies the subnet itself and can't be assigned to a device. The broadcast address (last in the range) sends packets to all hosts on the subnet simultaneously. Both are reserved, which is why usable hosts = total addresses minus 2.

Can I subnet a subnet?

Yes — it's called variable-length subnet masking (VLSM). You can take a /24 and split it into smaller subnets like two /25s or four /26s. Each sub-subnet follows the same math but with a longer prefix.

Related Developer calculators

You might also like

Last updated: September 7, 2026