Ralph did a chart for fitting juniors years ago that many still use today as a starting point. The chart says that the length for a driver for a 12 year old that is approximately that height could be anywhere from 38″ – 40.5″. That is quite a range that the length could be. One thing to consider is the shaft (most likely) is much lighter today that you are going to use than when Ralph did the chart. Also, heads are much bigger and more forgiving. I have seen some 12 year olds that can crank it, and they are not hitting 39″ drivers. I have always fit juniors like I fit everyone else, based on their stature, strength and ability. I like to have them set up and address the ball with a driver and then visually look to see what length “looks” right and allows them to set up comfortably. Once I determine that length, that’s the length we go with.
My intention is not to contradict the chart Ralph put together, but to update the technique a bit to account for lighter components, specifically the shaft. Ralph did state in his writing on the subject that the more athletic, the more ability the junior has, the length of the driver would most likely increase for whatever height and weight they are.
All this being said, I would start on the long end of that range (40.5″), and see how that looks and if possible evaluate how well the junior can make contact at that length. Always easier to go shorter than to add length. Last point, shorter clubs are easier to hit than longer clubs, so if I am going to error (especially for a beginning junior golfer) I am going to error on the shorter side. We want them to have some success hitting the ball right out of the gate and if the club is too long and they can’t hit it on the face, they will get discouraged. Not what we want.
Hope this helps.