How much thread do I need when cross-stitching a pattern?
From my knitting experience, the empirical way to find out would be a swatch - make N stitches, then rip it out. Measure how much thread you used and divide by N to get a rough estimate of thread per stitch.

If you want to calculate it from first principles, you also need to take into account the fabric count. For example, 14-count Aida has 14 holes per inch. That means each "X" is made inside a block which is 1/14" on each side. So the diagonal of the square is then sqrt(2)/14 inches, so an X is 2 * sqrt(2)/14.

Of course, you aren't just stitching the front of the "X". This is where the way you arrange stitches makes a difference. You may want to adjust this based on your method, but for contiguous areas I usually end up with a couple horizontal lines on the back. This corresponds to another 2/14" of thread (edges of the square your "X" is stitched into).

Putting it all together, for a fabric count C and number points N:

N * (2*sqrt(2)/C + 2/C)


As you note in your question, I would of course add more length depending on how complicated the areas are, and to allow for weaving in ends.