If you just need an approximation, Ramanujan's factorial approximation is supposed to be more accurate than Stirling's.
If you need (or want) something precise, you might try GMP, the GNU Multiple Precision library. I've used it successfully for primality testing of large numbers in Python.