Let's divide 527991 by 40
We're looking to find how many times 40 goes into 527991.

Advancing to step 1:
When dividing 5 by 40, we get 0 with a remainder of 5.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
The remainder is 5 after subtracting 0 from 5.
Grab the next digit (2) from the dividend, add it to 5, then carry on: 52 / 40

Step 2:
52 divided by 40 is 1 with a remainder of 12.
Put 1 as the next digit of the answer. 
Result so far: 1.0
Subtract 40 from 52 to get 12.
Grab the next digit (7) from the dividend, add it to 12, then carry on: 127 / 40

Moving on to step 3:
The number 40 fits into 127 3 times, leaving a remainder of 7.
The number 3 becomes the next digit in our result. 
Result so far: 13.0
The remainder is 7 after subtracting 120 from 127.
Grab the next digit (9) from the dividend, add it to 7, then carry on: 79 / 40

Going ahead to step 4:
If we divide 79 by 40, we get 1 and a remainder of 39.
The next digit of our result is 1. 
Result so far: 131.0
Subtracting 40 from 79 leaves us with 39.
Fetch the next digit (9) from the dividend, attach it to 39 and continue: 399 / 40

Step 5:
40 can be fit into 399 9 times, resulting in a remainder of 39.
Use 9 as the next digit of our solution. 
Result so far: 1319.0
If we take 360 away from 399, we end up with 39.
Grab the next digit (1) from the dividend, add it to 39, then carry on: 391 / 40

Advancing to step 6:
40 goes into 391 9 times with a remainder of 31.
Put 9 as the next digit of the answer. 
Result so far: 13199.0
Subtracting 360 from 391 leaves us 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.

Advancing to step 7:
When dividing 310 by 40, we get 7 with a remainder of 30.
The number 7 becomes the next digit in our result. 
Result so far: 13199.7
Subtracting 280 from 310 leaves us with 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:
When dividing 300 by 40, we get 7 with a remainder of 20.
Use 7 as the next digit of our solution. 
Result so far: 13199.77
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.

After the division, we end up with 13199.77 and a remainder of 0.02.