We divide 31370 by 40
We want to divide 31370 by 40.

Advancing to step 1:
When dividing 3 by 40, we get 0 with a remainder of 3.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we subtract 0 from 3, we get 3.
Include the next digit (1) from the dividend after 3, then repeat: 31 / 40

Let's proceed to step 2:
40 can be fit into 31 0 times, resulting in a remainder of 31.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Deduct 0 from 31 and we're left with 31.
Take the next digit (3) from the dividend and append it to 31, then repeat: 313 / 40

On to step 3:
40 goes into 313 7 times with a remainder of 33.
The next digit of our result is 7. 
Result so far: 7.0
Deduct 280 from 313 and we're left with 33.
Grab the next digit (7) from the dividend, add it to 33, then carry on: 337 / 40

Going ahead to step 4:
40 goes into 337 8 times with a remainder of 17.
The next digit of our result is 8. 
Result so far: 78.0
If we subtract 320 from 337, we get 17.
Take the next digit (0) from the dividend and append it to 17, then repeat: 170 / 40

Step 5:
40 goes into 170 4 times with a remainder of 10.
Record the quotient 4 as the next digit in the result. 
Result so far: 784.0
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 6:
100 divided by 40 is 2 with a remainder of 20.
The next digit of our result is 2. 
Result so far: 784.2
Deduct 80 from 100 and we're left 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.

Step 7:
40 goes into 200 5 times with a remainder of 0.
Use 5 as the next digit of our solution. 
Result so far: 784.25
The remainder is 0 after subtracting 200 from 200.
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 8:
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: 784.25
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.

Step 9:
40 goes into 0 0 times with a remainder of 0.
The next digit of our result is 0. 
Result so far: 784.25
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.

Our division results in 784.25 with a remaining 0.0.