How to use the ipv4 subnet calculator
The maths
A CIDR prefix /n leaves 32−n host bits, so the subnet holds 2(32−n) addresses. The network address is your IP with all host bits set to 0; the broadcast has them all set to 1. The netmask is n one-bits followed by zeros — for /24, that is 255.255.255.0.
Edge cases done honestly
/32 is a single host. /31 is the RFC 3021 point-to-point special case (2 usable). Everything /30 and shorter reserves network + broadcast, so usable = total − 2.
Example
192.168.1.10/24 lives in network 192.168.1.0, broadcast 192.168.1.255, usable hosts 192.168.1.1 – 192.168.1.254 (254 hosts), netmask 255.255.255.0, wildcard 0.0.0.255.
Frequently asked questions
How many usable hosts are in a /24?
254. A /24 has 256 addresses; the first is the network address and the last is the broadcast address, leaving 254 for devices.
Why does a /31 show 2 usable hosts instead of 0?
On point-to-point links, RFC 3021 allows both addresses of a /31 to be used — there is no broadcast on a two-device link. Older equipment may still treat /31 the classic way.
What is a wildcard mask used for?
It is the inverse of the netmask (255.255.255.255 minus the mask). Cisco ACLs and OSPF statements use wildcard masks to describe which address bits must match.
More free tools
Download & Upload Time Calculator
How long will that file take at your speed? Enter the file size and connection speed — or work backwards from the time you have.
Data Usage Estimator
Add up streaming, video calls, gaming and browsing to estimate your real monthly data usage in GB.
Speed Unit Converter
Convert Mbps, Gbps, MB/s and more — and finally see the difference between bits and bytes, in plain English.
SLA Uptime Calculator
What does 99.9% uptime actually allow? See permitted downtime per day, week, month and year for any SLA percentage.
Data Plan Cost Calculator
Compare two mobile or broadband plans fairly: cost per GB, overage at your real usage, and the true monthly total.
Home Internet Speed Planner
Tell it what your household does at the same time — get a sensible recommended speed, not a sales pitch.