If you want to make lids that fit (a very subjective term in box making) the easiest way to go about it is to cut some samples and see what happens.
Cut the mortise in a scrap piece and then cut the tenon in a second scrap piece. See how they fit together.
A lot of factors determine "fit". The first is what you consider a good fit. Some folks want a fit that produces a sucking sound when the lid is removed. Others, not so much. Then there is the issue that the wood may distort or move a bit after or during cutting. What I am trying to say is that the test pieces will get you close, but if you are carving fairly deeply into a piece of wood and removing a lot of outer material things can move. So test pieces get you in the ball park. Another thing is that cutters do not always cut to their stated size or even their measured size due to things like spindle runout, flex, etc.
That is my two cents. Oh, and one more penny: Changes in humidity can make a tight fitting lid impossible to remove without brute force.
Low Profile CNC Router Vise