407897 ÷ 40 
We're looking to find how many times 40 goes into 407897.

On to step 1:
When dividing 4 by 40, we get 0 with a remainder of 4.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we subtract 0 from 4, we get 4.
Bring next digit (0) of the dividend behind the 4 and repeat the process: 40 / 40

Moving on to step 2:
The number 40 fits into 40 1 times, leaving a remainder of 0.
The next digit of our result is 1. 
Result so far: 1.0
Subtract 40 from 40 to get 0.
Bring next digit (7) of the dividend behind the 0 and repeat the process: 7 / 40

Let's proceed to step 3:
40 goes into 7 0 times with a remainder of 7.
Record the quotient 0 as the next digit in the result. 
Result so far: 10.0
If we take 0 away from 7, we end up with 7.
Fetch the next digit (8) from the dividend, attach it to 7 and continue: 78 / 40

Moving on to step 4:
When dividing 78 by 40, we get 1 with a remainder of 38.
Use 1 as the next digit of our solution. 
Result so far: 101.0
Subtract 40 from 78 to get 38.
Grab the next digit (9) from the dividend, add it to 38, then carry on: 389 / 40

Step 5:
When dividing 389 by 40, we get 9 with a remainder of 29.
Record the quotient 9 as the next digit in the result. 
Result so far: 1019.0
If we take 360 away from 389, we end up with 29.
Bring next digit (7) of the dividend behind the 29 and repeat the process: 297 / 40

Let's proceed to step 6:
40 goes into 297 7 times with a remainder of 17.
Put 7 as the next digit of the answer. 
Result so far: 10197.0
Deduct 280 from 297 and we're left with 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

Moving on to step 7:
170 divided by 40 is 4 with a remainder of 10.
Write down 4 as next digit of the result. 
Result so far: 10197.4
If we subtract 160 from 170, we get 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Moving on to step 8:
40 goes into 100 2 times with a remainder of 20.
Write down 2 as next digit of the result. 
Result so far: 10197.42
Subtracting 80 from 100 leaves us 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.

Moving on to step 9:
200 divided by 40 is 5 with a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 10197.425
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.

Advancing to step 10:
If we divide 0 by 40, we get 0 and a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 10197.425
Subtract 0 from 0 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.

Moving on to step 11:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 10197.425
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 10197.425, with a leftover of 0.0.