807789 divided by 40 
We want to divide 807789 by 40.

On to step 1:
40 can be fit into 8 0 times, resulting in a remainder of 8.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 8, we get 8.
Bring next digit (0) of the dividend behind the 8 and repeat the process: 80 / 40

Step 2:
40 goes into 80 2 times with a remainder of 0.
The next digit of our result is 2. 
Result so far: 2.0
If we subtract 80 from 80, we get 0.
Take the next digit (7) from the dividend and append it to 0, then repeat: 7 / 40

Step 3:
If we divide 7 by 40, we get 0 and a remainder of 7.
The next digit of our result is 0. 
Result so far: 20.0
If we take 0 away from 7, we end up with 7.
Take the next digit (7) from the dividend and append it to 7, then repeat: 77 / 40

Step 4:
40 can be fit into 77 1 times, resulting in a remainder of 37.
Use 1 as the next digit of our solution. 
Result so far: 201.0
If we subtract 40 from 77, we get 37.
Append the next digit (8) from the dividend to 37 and continue with: 378 / 40

Step 5:
40 goes into 378 9 times with a remainder of 18.
The next digit of our result is 9. 
Result so far: 2019.0
The remainder is 18 after subtracting 360 from 378.
Fetch the next digit (9) from the dividend, attach it to 18 and continue: 189 / 40

Moving on to step 6:
40 goes into 189 4 times with a remainder of 29.
Use 4 as the next digit of our solution. 
Result so far: 20194.0
If we subtract 160 from 189, we get 29.
Since there are no more digits in the dividend, we add a zero to the remainder making it 290, and continue the process.

Step 7:
40 goes into 290 7 times with a remainder of 10.
The number 7 becomes the next digit in our result. 
Result so far: 20194.7
The remainder is 10 after subtracting 280 from 290.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Advancing to step 8:
40 can be fit into 100 2 times, resulting in a remainder of 20.
Use 2 as the next digit of our solution. 
Result so far: 20194.72
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.

Going ahead to step 9:
200 divided by 40 is 5 with a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 20194.725
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.

Let's proceed to step 10:
0 divided by 40 is 0 with a remainder of 0.
The next digit of our result is 0. 
Result so far: 20194.725
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.

Let's proceed to step 11:
When dividing 0 by 40, we get 0 with a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 20194.725
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.

After the division, we end up with 20194.725 and a remainder of 0.0.