Let's divide 397685 by 38
The aim is to understand the frequency of 38 in 397685.

On to step 1:
The number 38 fits into 3 0 times, leaving a remainder of 3.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we subtract 0 from 3, we get 3.
Take the next digit (9) from the dividend and append it to 3, then repeat: 39 / 38

Advancing to step 2:
39 divided by 38 is 1 with a remainder of 1.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
Subtract 38 from 39 to get 1.
Append the next digit (7) from the dividend to 1 and continue with: 17 / 38

Advancing to step 3:
38 can be fit into 17 0 times, resulting in a remainder of 17.
Use 0 as the next digit of our solution. 
Result so far: 10.0
If we take 0 away from 17, we end up with 17.
Take the next digit (6) from the dividend and append it to 17, then repeat: 176 / 38

Step 4:
38 can be fit into 176 4 times, resulting in a remainder of 24.
Put 4 as the next digit of the answer. 
Result so far: 104.0
The remainder is 24 after subtracting 152 from 176.
Take the next digit (8) from the dividend and append it to 24, then repeat: 248 / 38

Let's proceed to step 5:
The number 38 fits into 248 6 times, leaving a remainder of 20.
The next digit of our result is 6. 
Result so far: 1046.0
Subtract 228 from 248 to get 20.
Bring next digit (5) of the dividend behind the 20 and repeat the process: 205 / 38

Going ahead to step 6:
38 can be fit into 205 5 times, resulting in a remainder of 15.
Record the quotient 5 as the next digit in the result. 
Result so far: 10465.0
Subtracting 190 from 205 leaves us with 15.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

Step 7:
When dividing 150 by 38, we get 3 with a remainder of 36.
Write down 3 as next digit of the result. 
Result so far: 10465.3
Subtract 114 from 150 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.

On to step 8:
When dividing 360 by 38, we get 9 with a remainder of 18.
The next digit of our result is 9. 
Result so far: 10465.39
Subtract 342 from 360 to 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.

Advancing to step 9:
38 goes into 180 4 times with a remainder of 28.
Put 4 as the next digit of the answer. 
Result so far: 10465.394
If we subtract 152 from 180, we get 28.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

Moving on to step 10:
The number 38 fits into 280 7 times, leaving a remainder of 14.
The number 7 becomes the next digit in our result. 
Result so far: 10465.3947
Deduct 266 from 280 and we're left with 14.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

Let's proceed to step 11:
140 divided by 38 is 3 with a remainder of 26.
Record the quotient 3 as the next digit in the result. 
Result so far: 10465.39473
Subtract 114 from 140 to get 26.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

Going ahead to step 12:
38 goes into 260 6 times with a remainder of 32.
Use 6 as the next digit of our solution. 
Result so far: 10465.394736
If we subtract 228 from 260, we get 32.
Since there are no more digits in the dividend, we add a zero to the remainder making it 320, and continue the process.

On to step 13:
320 divided by 38 is 8 with a remainder of 16.
The next digit of our result is 8. 
Result so far: 10465.3947368
The remainder is 16 after subtracting 304 from 320.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

On to step 14:
38 can be fit into 160 4 times, resulting in a remainder of 8.
Put 4 as the next digit of the answer. 
Result so far: 10465.39473684
Subtracting 152 from 160 leaves us with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

After the division, we end up with 10465.39473684 and a remainder of 8e-09.