Before I finish the ceiling in my basement I want to run a wire to my attached garage to power my 220V welder. According to the manual the welder should be on a 40 amp circuit. My intention is to use this circuit for only my welder now, but later to power a sub panel when I build a detached garage. Once this is built my welder will be relocated to the detached. My question is what size wire do I need? In my detached I should only be using one big apliance at a time with a few lights.
Considering your plans I'd go with #6cu wire, and run a neutral even though your welder does not need one. The sub-panel will.
This way you can have a 60A sub-panel, which is a decent size for a residential shop/garage.