We look at the division of 50507040 by 840 
The aim is to understand the frequency of 840 in 50507040.

On to step 1:
When dividing 5 by 840, we get 0 with a remainder of 5.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtracting 0 from 5 leaves us with 5.
Grab the next digit (0) from the dividend, add it to 5, then carry on: 50 / 840

On to step 2:
When dividing 50 by 840, we get 0 with a remainder of 50.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we take 0 away from 50, we end up with 50.
Append the next digit (5) from the dividend to 50 and continue with: 505 / 840

Advancing to step 3:
When dividing 505 by 840, we get 0 with a remainder of 505.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Subtracting 0 from 505 leaves us with 505.
Fetch the next digit (0) from the dividend, attach it to 505 and continue: 5050 / 840

Let's proceed to step 4:
840 can be fit into 5050 6 times, resulting in a remainder of 10.
Put 6 as the next digit of the answer. 
Result so far: 6.0
If we take 5040 away from 5050, we end up with 10.
Append the next digit (7) from the dividend to 10 and continue with: 107 / 840

On to step 5:
840 can be fit into 107 0 times, resulting in a remainder of 107.
The next digit of our result is 0. 
Result so far: 60.0
Deduct 0 from 107 and we're left with 107.
Grab the next digit (0) from the dividend, add it to 107, then carry on: 1070 / 840

Step 6:
If we divide 1070 by 840, we get 1 and a remainder of 230.
Use 1 as the next digit of our solution. 
Result so far: 601.0
If we take 840 away from 1070, we end up with 230.
Append the next digit (4) from the dividend to 230 and continue with: 2304 / 840

Going ahead to step 7:
840 goes into 2304 2 times with a remainder of 624.
Write down 2 as next digit of the result. 
Result so far: 6012.0
Subtracting 1680 from 2304 leaves us with 624.
Include the next digit (0) from the dividend after 624, then repeat: 6240 / 840

Advancing to step 8:
840 goes into 6240 7 times with a remainder of 360.
The number 7 becomes the next digit in our result. 
Result so far: 60127.0
The remainder is 360 after subtracting 5880 from 6240.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3600, and continue the process.

Advancing to step 9:
840 goes into 3600 4 times with a remainder of 240.
The next digit of our result is 4. 
Result so far: 60127.4
The remainder is 240 after subtracting 3360 from 3600.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2400, and continue the process.

Advancing to step 10:
If we divide 2400 by 840, we get 2 and a remainder of 720.
The number 2 becomes the next digit in our result. 
Result so far: 60127.42
Subtracting 1680 from 2400 leaves us with 720.
Since there are no more digits in the dividend, we add a zero to the remainder making it 7200, and continue the process.

Advancing to step 11:
If we divide 7200 by 840, we get 8 and a remainder of 480.
Use 8 as the next digit of our solution. 
Result so far: 60127.428
Deduct 6720 from 7200 and we're left with 480.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4800, and continue the process.

Going ahead to step 12:
The number 840 fits into 4800 5 times, leaving a remainder of 600.
Put 5 as the next digit of the answer. 
Result so far: 60127.4285
Subtracting 4200 from 4800 leaves us with 600.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6000, and continue the process.

Going ahead to step 13:
840 can be fit into 6000 7 times, resulting in a remainder of 120.
Put 7 as the next digit of the answer. 
Result so far: 60127.42857
Subtract 5880 from 6000 to get 120.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1200, and continue the process.

Let's proceed to step 14:
840 can be fit into 1200 1 times, resulting in a remainder of 360.
The number 1 becomes the next digit in our result. 
Result so far: 60127.428571
The remainder is 360 after subtracting 840 from 1200.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3600, and continue the process.

Let's proceed to step 15:
When dividing 3600 by 840, we get 4 with a remainder of 240.
Put 4 as the next digit of the answer. 
Result so far: 60127.4285714
The remainder is 240 after subtracting 3360 from 3600.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2400, and continue the process.

Step 16:
If we divide 2400 by 840, we get 2 and a remainder of 720.
Use 2 as the next digit of our solution. 
Result so far: 60127.42857142
Subtracting 1680 from 2400 leaves us with 720.
Since there are no more digits in the dividend, we add a zero to the remainder making it 7200, and continue the process.

The final result is 60127.42857142 with a remainder of 7.2e-07.