We're dividing 821171 by 40 
Our goal is to divide 821171 by 40.

Advancing to step 1:
The number 40 fits into 8 0 times, leaving 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.
Grab the next digit (2) from the dividend, add it to 8, then carry on: 82 / 40

Step 2:
40 can be fit into 82 2 times, resulting in a remainder of 2.
Record the quotient 2 as the next digit in the result. 
Result so far: 2.0
If we subtract 80 from 82, we get 2.
Take the next digit (1) from the dividend and append it to 2, then repeat: 21 / 40

Moving on to step 3:
The number 40 fits into 21 0 times, leaving a remainder of 21.
Record the quotient 0 as the next digit in the result. 
Result so far: 20.0
Subtract 0 from 21 to get 21.
Include the next digit (1) from the dividend after 21, then repeat: 211 / 40

Advancing to step 4:
When dividing 211 by 40, we get 5 with a remainder of 11.
Use 5 as the next digit of our solution. 
Result so far: 205.0
Subtract 200 from 211 to get 11.
Append the next digit (7) from the dividend to 11 and continue with: 117 / 40

Going ahead to step 5:
The number 40 fits into 117 2 times, leaving a remainder of 37.
Use 2 as the next digit of our solution. 
Result so far: 2052.0
Subtract 80 from 117 to get 37.
Include the next digit (1) from the dividend after 37, then repeat: 371 / 40

On to step 6:
371 divided by 40 is 9 with a remainder of 11.
Write down 9 as next digit of the result. 
Result so far: 20529.0
Deduct 360 from 371 and we're left with 11.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

Let's proceed to step 7:
40 can be fit into 110 2 times, resulting in a remainder of 30.
The next digit of our result is 2. 
Result so far: 20529.2
If we subtract 80 from 110, we get 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Let's proceed to step 8:
40 can be fit into 300 7 times, resulting in a remainder of 20.
Put 7 as the next digit of the answer. 
Result so far: 20529.27
If we take 280 away from 300, we end up with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Advancing to step 9:
40 can be fit into 200 5 times, resulting in a remainder of 0.
Use 5 as the next digit of our solution. 
Result so far: 20529.275
Subtract 200 from 200 to 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.

Step 10:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 20529.275
Deduct 0 from 0 and we're left 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.

Step 11:
40 goes into 0 0 times with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 20529.275
If we take 0 away from 0, 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.

Our division results in 20529.275 with a remaining 0.0.