40307 in words is written as :

Forty Thousand Three Hundred and Seven