Let's divide 408321 by 42
The aim is to understand the frequency of 42 in 408321.

On to step 1:
If we divide 4 by 42, we get 0 and a remainder of 4.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we subtract 0 from 4, we get 4.
Include the next digit (0) from the dividend after 4, then repeat: 40 / 42

Moving on to step 2:
40 divided by 42 is 0 with a remainder of 40.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 40, we get 40.
Include the next digit (8) from the dividend after 40, then repeat: 408 / 42

On to step 3:
408 divided by 42 is 9 with a remainder of 30.
The number 9 becomes the next digit in our result. 
Result so far: 9.0
Deduct 378 from 408 and we're left with 30.
Bring next digit (3) of the dividend behind the 30 and repeat the process: 303 / 42

Advancing to step 4:
If we divide 303 by 42, we get 7 and a remainder of 9.
The number 7 becomes the next digit in our result. 
Result so far: 97.0
If we subtract 294 from 303, we get 9.
Include the next digit (2) from the dividend after 9, then repeat: 92 / 42

Going ahead to step 5:
When dividing 92 by 42, we get 2 with a remainder of 8.
Use 2 as the next digit of our solution. 
Result so far: 972.0
If we subtract 84 from 92, we get 8.
Fetch the next digit (1) from the dividend, attach it to 8 and continue: 81 / 42

Going ahead to step 6:
42 goes into 81 1 times with a remainder of 39.
Record the quotient 1 as the next digit in the result. 
Result so far: 9721.0
If we take 42 away from 81, we end up with 39.
Since there are no more digits in the dividend, we add a zero to the remainder making it 390, and continue the process.

Moving on to step 7:
When dividing 390 by 42, we get 9 with a remainder of 12.
Use 9 as the next digit of our solution. 
Result so far: 9721.9
If we subtract 378 from 390, we get 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Going ahead to step 8:
120 divided by 42 is 2 with a remainder of 36.
Use 2 as the next digit of our solution. 
Result so far: 9721.92
Deduct 84 from 120 and we're left with 36.
Since there are no more digits in the dividend, we add a zero to the remainder making it 360, and continue the process.

On to step 9:
When dividing 360 by 42, we get 8 with a remainder of 24.
Record the quotient 8 as the next digit in the result. 
Result so far: 9721.928
Subtracting 336 from 360 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.

Moving on to step 10:
42 goes into 240 5 times with a remainder of 30.
Record the quotient 5 as the next digit in the result. 
Result so far: 9721.9285
Deduct 210 from 240 and we're left 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.

On to step 11:
42 goes into 300 7 times with a remainder of 6.
Write down 7 as next digit of the result. 
Result so far: 9721.92857
If we take 294 away from 300, we end up with 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Going ahead to step 12:
The number 42 fits into 60 1 times, leaving a remainder of 18.
Write down 1 as next digit of the result. 
Result so far: 9721.928571
If we subtract 42 from 60, we get 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

Going ahead to step 13:
42 can be fit into 180 4 times, resulting in a remainder of 12.
The next digit of our result is 4. 
Result so far: 9721.9285714
Subtracting 168 from 180 leaves us with 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Moving on to step 14:
120 divided by 42 is 2 with a remainder of 36.
Record the quotient 2 as the next digit in the result. 
Result so far: 9721.92857142
Subtract 84 from 120 to get 36.
Since there are no more digits in the dividend, we add a zero to the remainder making it 360, and continue the process.

The final result is 9721.92857142 with a remainder of 3.6e-08.