The five class boundaries
Classful addressing sorted IPv4 space by the value of the first octet. Class A covered 1 to 126, Class B 128 to 191, Class C 192 to 223, Class D 224 to 239 and Class E 240 to 255. The boundary is really a pattern in the leading bits: Class A starts with 0, Class B with 10, Class C with 110, Class D with 1110 and Class E with 1111. Address 127 is reserved for loopback and 0 is reserved as "this network", which is why the Class A range stops at 126.
Each class carried a default mask. Class A meant a /8 prefix, so 16,777,216 addresses with 16,777,214 usable hosts. Class B meant /16, giving 65,536 addresses and 65,534 usable hosts. Class C meant /24, 256 addresses and 254 usable hosts. Class D had no host mask at all because it is multicast, not unicast, and Class E was reserved for experimental use.
The part most tutorials skip: classes are history
Classful addressing was defined in the early 1980s, when a few thousand networks existed. It scaled badly, because an organisation that needed 300 hosts was handed a whole Class B and 65,000 addresses were wasted. Classless Inter-Domain Routing replaced the scheme in 1993, and since then the prefix length in the notation, not the first octet, decides the size of a network. A modern router does not care that 10.5.0.0 looks like Class A; it cares that you wrote /16.
So treat this tool as an identifier of the historic class and the default mask that went with it, plus a quick read on whether the address is private, loopback, link-local or multicast. It is a fast orientation check, not a routing decision.
Two addresses, two answers
Take 172.20.4.9. The first octet is 172, which falls between 128 and 191, so the address is Class B. The binary form confirms it: 172 is 10101100, so the leading bits are 10. The default mask is 255.255.0.0, which would make it a /16 with 65,534 usable hosts. The second octet, 20, sits between 16 and 31, which places the address inside 172.16.0.0/12, one of the three private ranges reserved by RFC 1918, so it is not routable on the public internet and should never appear in a firewall allowlist for outside traffic.
A second case: 224.0.0.9. The first octet is 224, so this is Class D, multicast. In binary, 224 is 11100000, matching the 1110 prefix. There is no host range to compute, because the address names a group rather than an interface. 224.0.0.9 is the group used by RIPv2 routers, and it is scoped to the local segment rather than forwarded.
Private and special ranges worth memorising
RFC 1918 sets aside 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private use. Beyond those: 127.0.0.0/8 is loopback, 169.254.0.0/16 is link-local and appears when DHCP fails, 100.64.0.0/10 is the carrier-grade NAT range, and 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 are reserved for documentation examples so that tutorials never point at a real host.
To turn one of these into concrete first and last addresses, use CIDR to range. To split a block into smaller ones with their own masks, use the subnet calculator. And if you need the same address in integer or hex form for a database field, IP converter handles that round trip.
