Accurately setting a miter gauge
A tight miter joint begins with precise equipment. Make sure your tablesaw table sits square with the blade. Then set your miter gauge using this trick. Insert tight-fitting 3⁄4 " scrap into the right miter-gauge slot, and place your miter gauge into the left slot. Slide an accurate 45° angle against the scrap, and place a steel rule against the miter gauge. Then line up the angle, the rule, and the miter gauge. To double-check the accuracy of your setup, cut miters on two pieces of scrap, hold them together at a right angle, and check them with a reliable square. They should fit with no gaps.