We look at the division of 501387 by 27 
We're looking to find how many times 27 goes into 501387.

Advancing to step 1:
5 divided by 27 is 0 with a remainder of 5.
Put 0 as the next digit of the answer. 
Result so far: 0.0
The remainder is 5 after subtracting 0 from 5.
Fetch the next digit (0) from the dividend, attach it to 5 and continue: 50 / 27

Advancing to step 2:
27 can be fit into 50 1 times, resulting in a remainder of 23.
Write down 1 as next digit of the result. 
Result so far: 1.0
If we take 27 away from 50, we end up with 23.
Take the next digit (1) from the dividend and append it to 23, then repeat: 231 / 27

Let's proceed to step 3:
The number 27 fits into 231 8 times, leaving a remainder of 15.
Use 8 as the next digit of our solution. 
Result so far: 18.0
Subtract 216 from 231 to get 15.
Include the next digit (3) from the dividend after 15, then repeat: 153 / 27

Advancing to step 4:
27 goes into 153 5 times with a remainder of 18.
Record the quotient 5 as the next digit in the result. 
Result so far: 185.0
If we take 135 away from 153, we end up with 18.
Fetch the next digit (8) from the dividend, attach it to 18 and continue: 188 / 27

On to step 5:
When dividing 188 by 27, we get 6 with a remainder of 26.
Put 6 as the next digit of the answer. 
Result so far: 1856.0
The remainder is 26 after subtracting 162 from 188.
Grab the next digit (7) from the dividend, add it to 26, then carry on: 267 / 27

Let's proceed to step 6:
The number 27 fits into 267 9 times, leaving a remainder of 24.
Record the quotient 9 as the next digit in the result. 
Result so far: 18569.0
Subtracting 243 from 267 leaves us with 24.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

Advancing to step 7:
If we divide 240 by 27, we get 8 and a remainder of 24.
Use 8 as the next digit of our solution. 
Result so far: 18569.8
Subtract 216 from 240 to get 24.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

Moving on to step 8:
27 goes into 240 8 times with a remainder of 24.
Write down 8 as next digit of the result. 
Result so far: 18569.88
If we subtract 216 from 240, we get 24.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

The final outcome is 18569.88, with a leftover of 0.024.