10587 in words is written as :

Ten Thousand Five Hundred and Eighty Seven