You may well up up with a much longer stem, I`d reckon on equiv frame sizes teh top tube on a MTB frame could be 4cm longer than on a road bike. However this extra length is then offset to some degree by fact that flat bars will be wider than drop bars (eg 60+cm v 42/44cm), and if you also fit bar ends then riding position may end up pretty clos to that with drop bars. Suggest that before removing drop bars measure a set of distances from saddle nose point as reference to centre bars, top curve of bars, brake hoods top, drop on bars as these can then be used to aid setup with flat bars.
If its any help from my experience riding an MTB commuter with flat bars / bar ends I`m using a similar length stem (up to 2cm shorter) to that on my road bike and achieving similar setup distances to above , therefore I would expect you to end up with a 2cm+ longer stem when swopping over to flat bars.
btw if you`re interested I have in std (not oversize ) clamp stems at 90 / 100 / 120 mm second hand for you to try 🙂