if you cutting back portion off, to rethread the tube later, and leave eveything else stock, than you need to cut it by D cell (or 1\2) lenght, about 60mm. or 30 in case of 1,5d/
if you cutting front off, to use tailswitch, and glue the head permanently than there are few other factors, that matter.
Are you talking about a home made cut down that you will cut a chunk out of and grind down the inside of one end and the outside of the other end and JB weld them back together, or a shortened rethreaded maglite? And this is also a tough question to answer because it depends on what battery configuration you want. Are you looking at a 3AA converter or a 18500, or a 26650? These would all be different cuts and I assume that is why none of the posters put their actual measurements up. I have 2 shortened mags that are just missing a chunk of the tube, but have the factory threads. I can give you good measurements from each end to the cut if you want them. Mine are driven by a protected 26650 with a little bit cut off the spring. If I was to do another one I would plan a 26650 with a VERY short modified spring in the tail which would probably save me another 1/2 inch off the body. I hope this helps. Just plan it out a tiny bit shorter than it should be and there should be plenty of spring to cut off if you went an 1/8 of an inch to short.
Each "D" cell is about 60mm so 120mm space needed for 2 "D" size cells.
Each AA is about 50mm long and bundle of three will fit in unbored M*g D
If your AAs do not have any holder, (120-50) 70mm shortening of 2D M*g will work.
If you are usingthiskind of holder, (120-65) 55mm shortening of 2D M*g will work.
There are not many bright 3.6 volt incand bulbs but there are many option to convert to LEDs depending on your budget and skill.
BTW, Li-ions will work better unless if you don't like them and want to stay away from them.