A tank measuring 36 × 18 × 16 inches is the standard 40-gallon breeder. Multiplying it out gives 10,368 cubic inches, which is 44.88 US gallons (169.9 litres), about 12% more than the name on the box. That gap is normal: the rated size is a nominal figure, and the number you should dose and stock against is the water actually in the tank, which is lower still once substrate, rocks and the gap below the rim are taken out. Allow 10–20% for those and this tank holds nearer 36–40 gallons in practice.
Check the label against the dimensions rather than the other way round. A 20-gallon long measures 30 × 12 × 12 inches and a 20-gallon high measures 24 × 12 × 16: same rated volume, different footprint, and the footprint is what determines surface area for gas exchange and swimming room.
At a practical fill level of 90% (accounting for substrate, décor, and headspace below the rim), usable water volume comes to 40.39 gallons (152.9 liters). That usable figure, not the gross or the labeled size, is what should drive heater wattage, filter turnover, and medication dosing decisions.