So many variables that it’s impossible to know what would be best for you. Generally stock shafts are light and have high torque ratings and this may or may not be a good thing for your swing. It also depends on what you want to achieve with a shaft change – do you need to hit it higher or lower, more or less spin? Do you want to hit a draw or a fade? I would check the shaft specs if your current shaft and then adjust based on what you want to see differently in your ball flight. You might also want to check the head weight of the driver head and maybe adjust that if needed with weights or lead tape. In terms of gaining distance – definitely experiment with a longer shaft to play 47 or 48″ – you will gain distance at the expense of accuracy but this may not be as much of an issue if you are a good ball striker or if you play on courses that aren’t punishing if you miss the fairway. With a longer shaft, you may need a lighter head to feel right but maybe not, the only way to know is to try. In terms of shaft weight, some people do better with heavier shafts and some with lighter shafts – really depends on how it feels to you and also how strong a swinger you are and how heavy a driver setup you need to feel you can control the club versus something that feels too light. Of course something too heavy might be tiring, affecting you on the back nine due to increased fatigue.
Having said all that, if you are just trying to get a few more yards the simplest way would likely be to lower your spin and try to hit a draw if you aren’t already as you will gain more roll versus hitting it straight or a fade as it will likely be a lower spinning shot. If i were you, determine first if you need more or less spin off the driver and then try a shaft that will achieve this. If you do need lower spin, you could also try an M3 (or M1 or M5) driver head with your shaft as it will be a lower spinning head and this may be enough to see a difference too. Hope this helps.