For heating requirements, Carl Strohmeyer, Aquarium Answers, recommends 25 watts of heater for every 10 degrees of ambient temperature per 10 gallons you need to raise your aquarium temperature.
EXAMPLE: If your home is 68 degrees and you have a 40 gallon aquarium, to reach a temperature of 78 degrees you would need a 100 watt heater.
How is this worked out - the difference in temperature is 10 degrees, which requires 25 watts of heater to raise the temperature of 10 gallons. As you have a 40 gallon aquarium you need 4 heaters (4x10gallons) at 25 watts to heat the water. So a 100 watt heater is ideal.
The following table assumes 25 watts are required to heat 10 gallons by 10 degrees:
Another guide is 1 watt for every litre of water.
This calculates a larger heater - but at least you know that you will be covered. Not over working the heater !