8871 in words is written as :

Eight Thousand Eight Hundred and Seventy One