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

Let's proceed to step 1:
The number 40 fits into 6 0 times, leaving a remainder of 6.
The next digit of our result is 0. 
Result so far: 0.0
The remainder is 6 after subtracting 0 from 6.
Grab the next digit (4) from the dividend, add it to 6, then carry on: 64 / 40

On to step 2:
The number 40 fits into 64 1 times, leaving a remainder of 24.
Use 1 as the next digit of our solution. 
Result so far: 1.0
If we subtract 40 from 64, we get 24.
Include the next digit (5) from the dividend after 24, then repeat: 245 / 40

On to step 3:
40 can be fit into 245 6 times, resulting in a remainder of 5.
Write down 6 as next digit of the result. 
Result so far: 16.0
Subtract 240 from 245 to get 5.
Take the next digit (4) from the dividend and append it to 5, then repeat: 54 / 40

Step 4:
40 goes into 54 1 times with a remainder of 14.
Use 1 as the next digit of our solution. 
Result so far: 161.0
Deduct 40 from 54 and we're left with 14.
Include the next digit (7) from the dividend after 14, then repeat: 147 / 40

Step 5:
When dividing 147 by 40, we get 3 with a remainder of 27.
Put 3 as the next digit of the answer. 
Result so far: 1613.0
Subtracting 120 from 147 leaves us with 27.
Include the next digit (1) from the dividend after 27, then repeat: 271 / 40

Step 6:
271 divided by 40 is 6 with a remainder of 31.
Put 6 as the next digit of the answer. 
Result so far: 16136.0
If we take 240 away from 271, we end up with 31.
Since there are no more digits in the dividend, we add a zero to the remainder making it 310, and continue the process.

Step 7:
40 goes into 310 7 times with a remainder of 30.
Put 7 as the next digit of the answer. 
Result so far: 16136.7
If we subtract 280 from 310, 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.

Moving on to step 8:
The number 40 fits into 300 7 times, leaving a remainder of 20.
Put 7 as the next digit of the answer. 
Result so far: 16136.77
Subtract 280 from 300 to get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

The final outcome is 16136.77, with a leftover of 0.02.