The general rules I learned in high school that I've gone by:
1. Always start a sentence with the numbers typed out. I'm sure you've noticed that it looks really odd. If it's something really big that would be a pain to type out, then don't start the sentence that way.
2. If the number is 10 or less, spell it out. If it's 11 to 20, go with whatever works better in the sentence. Generally, use numbers for anything greater than 20.
3. Don't switch between typing it out and doing numerals in the same sentence. Remain consistent there. This trumps #2 if you sentence goes something like "These 865 red elephants ran around me 9 times." (yes, I'm really tired) Don't type out "nine" even though it is ten or less. You might need to change around the sentence to satisfy #1. The previous was better than doing "Nine times these 865 red elephants ran around me."
Hope that helps some.