We're dividing 859171 by 40 
Let's see how many times 40 fits into 859171.

Let's proceed to step 1:
8 divided by 40 is 0 with a remainder of 8.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtracting 0 from 8 leaves us with 8.
Bring next digit (5) of the dividend behind the 8 and repeat the process: 85 / 40

Advancing to step 2:
If we divide 85 by 40, we get 2 and a remainder of 5.
Put 2 as the next digit of the answer. 
Result so far: 2.0
Deduct 80 from 85 and we're left with 5.
Bring next digit (9) of the dividend behind the 5 and repeat the process: 59 / 40

Going ahead to step 3:
59 divided by 40 is 1 with a remainder of 19.
The next digit of our result is 1. 
Result so far: 21.0
If we take 40 away from 59, we end up with 19.
Take the next digit (1) from the dividend and append it to 19, then repeat: 191 / 40

Let's proceed to step 4:
If we divide 191 by 40, we get 4 and a remainder of 31.
Record the quotient 4 as the next digit in the result. 
Result so far: 214.0
If we take 160 away from 191, we end up with 31.
Take the next digit (7) from the dividend and append it to 31, then repeat: 317 / 40

On to step 5:
The number 40 fits into 317 7 times, leaving a remainder of 37.
Put 7 as the next digit of the answer. 
Result so far: 2147.0
Subtract 280 from 317 to get 37.
Grab the next digit (1) from the dividend, add it to 37, then carry on: 371 / 40

Step 6:
If we divide 371 by 40, we get 9 and a remainder of 11.
The next digit of our result is 9. 
Result so far: 21479.0
If we subtract 360 from 371, we get 11.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

Advancing to step 7:
110 divided by 40 is 2 with a remainder of 30.
Use 2 as the next digit of our solution. 
Result so far: 21479.2
The remainder is 30 after subtracting 80 from 110.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Moving on to step 8:
The number 40 fits into 300 7 times, leaving a remainder of 20.
Record the quotient 7 as the next digit in the result. 
Result so far: 21479.27
The remainder is 20 after subtracting 280 from 300.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Let's proceed to step 9:
40 can be fit into 200 5 times, resulting in a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 21479.275
If we take 200 away from 200, we end up with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Going ahead to step 10:
40 goes into 0 0 times with a remainder of 0.
The next digit of our result is 0. 
Result so far: 21479.275
The remainder is 0 after subtracting 0 from 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Let's proceed to step 11:
40 can be fit into 0 0 times, resulting in a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 21479.275
If we subtract 0 from 0, we get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

The final outcome is 21479.275, with a leftover of 0.0.