Spell out all whole numbers from zero to one hundred. Also spell out numbers that end with hundred, thousand, hundred thousand or million. For example, you would spell five thousand but use numerals for 5,001. When spelling out large numbers, exclude the commas found in the numeral.
Use the same format for numbers in close proximity to one another. If a sentence or paragraph includes some numbers that should be written and some that should be numerals, choose one format or the other and stick with it. For example, if you write "Bill picked 145 apples and sold eighty-five," correct it by writing "Bill picked 145 apples and sold 85," or "Bill picked one hundred forty five apples and sold eighty-five." Both versions are correct, but you should choose the format that makes the sentence easier for readers to understand.
Spell out numbers when writing dialogue. Exceptions may be made when dealing with extremely large numbers that would make the sentence unwieldy to spell out. Years are a common exception.