Is there a "magic" formula to cutting tight miter joints?
I use a stop block (piece of wood approximately 1-1/2" square) clamped to the back stop or fence of either the table saw miter gauge or fence of a chop saw ( miter saw). The main thing is that the lengths must be equal. In other words if you are cutting miters for a rectangle, the two long sides must be exactly the same length and the two short sides must be exactly the same length in order for the 45 degree miters to line up. The same rule applies to a square frame, except being a square, all four sides need to be exactly the same length.
I think one of the best ways to cut accurate mitered corners is on a sliding miter sled on the tablesaw. The sled is generally 1/2" plywood (good quality, I would use apple ply or Baltic birch ply ) with a plywood fence attached to the top of it. The fence needs to form a precise ninety degree corner. If it is attached to the sled and your position is off just a little it still works and here is why. As long as you mark the pieces of wood and cut side A on the left side of the fence and side B on the right side of the fence, they will still form a perfect ninety degree corner even if one miter is 44 degrees and the other miter is 46 degrees. We do sell a plan to make this sled from our website. The price is $14.95 .
One of the other biggest challenges with miters is getting a perfect glue up. Even if the joints fit perfectly without glue they can get out of alignment during the glue up. One of my favorite expressions is that "glue changes everything". Once you put glue on the miters there is the viscosity of the glue holding the joints apart and making them slippery so that when force is applied they can slide a 1/16" this way or a 1/32" that way making for a frustrating experience. I always start with a " dry clamp" to rehearse and make sure it looks good and all of my clamps are available. The other technique I like, is to use a "band clamp" (clamp with a canvas strap) to pull everything together. Once they are in place, then I use a bar clamp or pipe clamp for each side (four total). This way I can "dial in " the pressure slowly. I start lightly, check the alignment, make adjustments if necessary, add a little more pressure and put on some magnifying lenses , scrape away some of the glue with a putty knife, check to see that it looks tight under magnification, and finish up with just a little more clamping pressure.