PrahiX

Free tool — no sign-up, nothing stored

Subnet calculator.

Enter an IPv4 address and a prefix length. Everything runs in your browser — no address you type here is sent anywhere, logged, or kept.

You can also type the prefix inline, like 10.20.30.40/22 — it overrides the dropdown.

Network address
192.168.1.0
Broadcast address
192.168.1.255
First usable host
192.168.1.1
Last usable host
192.168.1.254
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Usable hosts
254
Total addresses
256
CIDR notation
192.168.1.0/24
Address scope
Private (RFC 1918)
Legacy class
C
Mask in binary
11111111.11111111.11111111.00000000

Subnet mask reference.

Every IPv4 prefix from /0 to /32, with its subnet mask, wildcard mask and host count. Usable-host figures follow the rules that actually apply: a /31 carries two usable addresses on a point-to-point link (RFC 3021) and a /32 is a single host route.

IPv4 prefix lengths with subnet mask, wildcard mask, total addresses and usable hosts
PrefixSubnet maskWildcard maskTotal addressesUsable hosts
/00.0.0.0255.255.255.2554,29,49,67,2964,29,49,67,294
/1128.0.0.0127.255.255.2552,14,74,83,6482,14,74,83,646
/2192.0.0.063.255.255.2551,07,37,41,8241,07,37,41,822
/3224.0.0.031.255.255.25553,68,70,91253,68,70,910
/4240.0.0.015.255.255.25526,84,35,45626,84,35,454
/5248.0.0.07.255.255.25513,42,17,72813,42,17,726
/6252.0.0.03.255.255.2556,71,08,8646,71,08,862
/7254.0.0.01.255.255.2553,35,54,4323,35,54,430
/8255.0.0.00.255.255.2551,67,77,2161,67,77,214
/9255.128.0.00.127.255.25583,88,60883,88,606
/10255.192.0.00.63.255.25541,94,30441,94,302
/11255.224.0.00.31.255.25520,97,15220,97,150
/12255.240.0.00.15.255.25510,48,57610,48,574
/13255.248.0.00.7.255.2555,24,2885,24,286
/14255.252.0.00.3.255.2552,62,1442,62,142
/15255.254.0.00.1.255.2551,31,0721,31,070
/16255.255.0.00.0.255.25565,53665,534
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122
/32255.255.255.2550.0.0.011

Have Questions? We've Got Answers.

The prefix is the number of leading 1 bits in the mask. A /24 means the first 24 bits are network and the remaining 8 are host, which written as four octets is 255.255.255.0. A /22 sets 22 bits, giving 255.255.252.0. The calculator above shows the mask in binary as well, which is the quickest way to see why a non-octet boundary like /22 or /27 lands where it does.

For a /30 or larger, it is two fewer than the total: the first address identifies the network and the last is the broadcast address, so a /24 has 256 addresses and 254 usable ones. The exceptions are a /31, which has two usable addresses and no network or broadcast address on a point-to-point link (RFC 3021), and a /32, which is a single host route. Plenty of calculators get those two wrong.

A wildcard mask is the bitwise inverse of the subnet mask — a /24's mask is 255.255.255.0 and its wildcard is 0.0.0.255. Subnet masks describe where a network ends; wildcard masks are what access control lists and OSPF network statements on Cisco and several other platforms expect. Reading one where the other is required is a common and quietly confusing mistake.

10.0.0.0/8, 172.16.0.0/12 (that is 172.16 through 172.31, not 172.16 through 172.32) and 192.168.0.0/16, as defined in RFC 1918. The calculator also identifies loopback (127.0.0.0/8), link-local or APIPA (169.254.0.0/16), carrier-grade NAT space (100.64.0.0/10), multicast and reserved ranges, because those are the addresses people most often mistake for public ones.

No. The calculation runs entirely in your browser in JavaScript — there is no request, no logging and no storage. You can confirm it by opening your network tab, or by disconnecting from the internet after the page loads and watching it keep working.

Not yet — this one is IPv4 only. IPv6 subnetting is a different exercise in practice: the address space is large enough that host counts stop being the interesting number and prefix delegation and boundary alignment become the questions worth asking. If an IPv6 tool would be useful to you, tell us and we will build it.

Because it is genuinely useful and costs us nothing to run. PrahiX builds a converged operations platform for network, security and video, so the people who need a subnet calculator at three in the morning are the people we build for. The tool is free, ungated and will stay that way — there is no email wall and nothing to sign up for.

Built by the people who monitor the networks you subnet.

This calculator is free, has no sign-up and will stay that way — bookmark it, share it, use it at three in the morning. If you also have to keep those networks running, PrahiX is a converged operations platform for network, security and video, built in India.