Its more about learning how to do it so i can calculate whatever voltage i need for future projects.
LEDs are current driven devices not voltage, and they should also have DC current not AC... This is an important fact you need to understand when you are driving LEDs...
If your LEDs are 30W and you pump in 40V into them you will need to limit the current to 750mA or you will face potential thermal overrun... See *Steve's* Sticky on LEDs...
Transformer windings are a simple ratio... If you put 120V in and want 40V out that is 120/40 or a 3:1 ratio... But, in this case you want DC and when you rectify full bridge rectify AC you get out ~1.414 the volts you put in... So in this case if the end goal is 40VDC then you want to have about 28VAC coming out... Thus a ratio of 120/28 or a 30:7 ratio... This will net you about 28VAC out once rectified to DC will be about 40VDC... But, you also have to factor in that the electric company is generally stingy, thus they rarely give you a full 120V at the outlet, in many cases (depending on location) it's closer to 110V... When using a transformer if your input varies so does the output as well, output is fully dependent upon the input... This is why most wall warts have additional regulation built in to hold the output voltage steady...
The current the transformer can deliver is determined by the number of windings in each coil of that ratio (and wire size)... So a 3:1 transformer with 300 and 100 windings will produce more current then one made with 30 and 10 windings...