Every IPv4 address is a 32-bit number wearing dotted decimals, and a subnet is just a split point: the first n bits name the network, the rest name hosts. From that one split, everything else is bitwise arithmetic — which this calculator performs and shows in binary.
The /24 worked example
192.168.1.10/24: the mask is 255.255.255.0, ANDing gives network 192.168.1.0, ORing the inverted mask gives broadcast 192.168.1.255, and hosts .1 through .254 — 254 usable — live between. The two reserved endpoints are the price every ordinary subnet pays.
Reading prefixes at a glance
Each prefix step halves the network: /25 = 126 hosts, /26 = 62, /27 = 30, /28 = 14. Going the other way, /16 holds 65,534 and the whole 10.0.0.0/8 private block over 16 million. The binary expander makes the split visible — network bits bright, host bits dimmed.
The special cases people forget
/31 breaks the minus-two rule on purpose: RFC 3021 defines both addresses usable for point-to-point router links, where broadcast is meaningless. /32 is a single-host route — the notation firewalls and routing tables use to mean "exactly this machine." The calculator labels both instead of reporting a nonsensical "0 usable hosts."
Private ranges and neighbors
RFC 1918 reserves 10/8, 172.16/12 and 192.168/16 for private networks — the presets cover all three families. The bit manipulation underneath is plain base-2 arithmetic: see it standalone in the number base converter and the binary translator.
IPv4 only; all math is exact 32-bit bitwise arithmetic.