We're dividing 506874 by 5 
We're looking to find how many times 5 goes into 506874.

Going ahead to step 1:
5 divided by 5 is 1 with a remainder of 0.
Write down 1 as next digit of the result. 
Result so far: 1.0
If we take 5 away from 5, we end up with 0.
Append the next digit (0) from the dividend to 0 and continue with: 0 / 5

On to step 2:
The number 5 fits into 0 0 times, leaving a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 10.0
The remainder is 0 after subtracting 0 from 0.
Grab the next digit (6) from the dividend, add it to 0, then carry on: 6 / 5

Going ahead to step 3:
5 goes into 6 1 times with a remainder of 1.
Record the quotient 1 as the next digit in the result. 
Result so far: 101.0
Subtracting 5 from 6 leaves us with 1.
Bring next digit (8) of the dividend behind the 1 and repeat the process: 18 / 5

Going ahead to step 4:
When dividing 18 by 5, we get 3 with a remainder of 3.
Record the quotient 3 as the next digit in the result. 
Result so far: 1013.0
Subtracting 15 from 18 leaves us with 3.
Append the next digit (7) from the dividend to 3 and continue with: 37 / 5

On to step 5:
If we divide 37 by 5, we get 7 and a remainder of 2.
Write down 7 as next digit of the result. 
Result so far: 10137.0
If we subtract 35 from 37, we get 2.
Grab the next digit (4) from the dividend, add it to 2, then carry on: 24 / 5

Going ahead to step 6:
5 goes into 24 4 times with a remainder of 4.
Put 4 as the next digit of the answer. 
Result so far: 101374.0
If we subtract 20 from 24, we get 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Going ahead to step 7:
40 divided by 5 is 8 with a remainder of 0.
The next digit of our result is 8. 
Result so far: 101374.8
Subtract 40 from 40 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 8:
If we divide 0 by 5, we get 0 and a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 101374.8
Subtracting 0 from 0 leaves us 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.

Moving on to step 9:
If we divide 0 by 5, we get 0 and a remainder of 0.
The next digit of our result is 0. 
Result so far: 101374.8
The remainder is 0 after subtracting 0 from 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 101374.8 and a remainder of 0.0.