When comparing the wattage of two amplifiers, it is important to note that wattage primarily refers to the power output of the amplifier, not directly to the loudness. However, there is a relationship between wattage and perceived loudness.
The perceived loudness difference between a 40-watt amplifier and a 20-watt amplifier is not significant. In general, a doubling of wattage typically results in an increase of around 3 decibels (dB) in perceived loudness. So, a 40-watt amplifier would be around 3 dB louder than a 20-watt amplifier.
While a 3 dB increase in loudness is technically noticeable, it may not be substantially significant to most listeners. To achieve a significant increase in perceived loudness, you would typically need to double the wattage several times. For example, going from a 20-watt amplifier to a 320-watt amplifier would result in a noticeable difference in loudness, as it represents a tenfold increase in power output.
Keep in mind that other factors such as speaker efficiency, room acoustics, and the specific audio source can also affect the perceived loudness.