For classful networks, the available addresses are given by the Wikipedia page on Classful Networks.
Class A = 16,777,214
Class B = 65534
Class C = 254
The Wikipedia page also discusses the calculation:
The number of addresses usable for addressing specific hosts in each network is always 2N - 2, where N is the number of rest field bits, and the subtraction of 2 adjusts for the use of the all-bits-zero host portion for network address and the all-bits-one host portion as a broadcast address. Thus, for a Class C address with 8 bits available in the host field, the number of hosts is 254.
As Zac67 points out in the comments, /31 subnets differ in the calculation as there is no network and broadcast address. With /32 a single host is defined. These subnets are not available in classful networks but I'm adding them here for completeness.
It's worth noting that nobody uses classful networks anymore.