Here is a link on how to calculate those triangles:
http://quiltville.com/onpointmath.shtml
A lot of us cut the squares (and therefore the triangles that come from cutting the square in half) a little larger, sew them on, press, and then cut off the excess. It's a little more work, but makes for much better accuracy.
Here is a link to a recent thread on this topic:
http://www.quiltingboard.com/main-f1...n-t202303.html