6400031 in words is written as :

Six Million Thousand Thirty One