997271 ÷ 38 
The aim is to understand the frequency of 38 in 997271.

On to step 1:
9 divided by 38 is 0 with a remainder of 9.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 9 after subtracting 0 from 9.
Include the next digit (9) from the dividend after 9, then repeat: 99 / 38

Let's proceed to step 2:
99 divided by 38 is 2 with a remainder of 23.
Write down 2 as next digit of the result. 
Result so far: 2.0
Deduct 76 from 99 and we're left with 23.
Bring next digit (7) of the dividend behind the 23 and repeat the process: 237 / 38

Going ahead to step 3:
237 divided by 38 is 6 with a remainder of 9.
Use 6 as the next digit of our solution. 
Result so far: 26.0
If we take 228 away from 237, we end up with 9.
Bring next digit (2) of the dividend behind the 9 and repeat the process: 92 / 38

Moving on to step 4:
38 can be fit into 92 2 times, resulting in a remainder of 16.
Use 2 as the next digit of our solution. 
Result so far: 262.0
If we subtract 76 from 92, we get 16.
Bring next digit (7) of the dividend behind the 16 and repeat the process: 167 / 38

Advancing to step 5:
The number 38 fits into 167 4 times, leaving a remainder of 15.
Use 4 as the next digit of our solution. 
Result so far: 2624.0
The remainder is 15 after subtracting 152 from 167.
Take the next digit (1) from the dividend and append it to 15, then repeat: 151 / 38

Going ahead to step 6:
38 can be fit into 151 3 times, resulting in a remainder of 37.
The number 3 becomes the next digit in our result. 
Result so far: 26243.0
If we take 114 away from 151, we end up with 37.
Since there are no more digits in the dividend, we add a zero to the remainder making it 370, and continue the process.

On to step 7:
When dividing 370 by 38, we get 9 with a remainder of 28.
Put 9 as the next digit of the answer. 
Result so far: 26243.9
Deduct 342 from 370 and we're left with 28.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

Going ahead to step 8:
The number 38 fits into 280 7 times, leaving a remainder of 14.
The next digit of our result is 7. 
Result so far: 26243.97
If we subtract 266 from 280, we get 14.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

Moving on to step 9:
140 divided by 38 is 3 with a remainder of 26.
Put 3 as the next digit of the answer. 
Result so far: 26243.973
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.

Let's proceed to step 10:
38 can be fit into 260 6 times, resulting in a remainder of 32.
Write down 6 as next digit of the result. 
Result so far: 26243.9736
Deduct 228 from 260 and we're left with 32.
Since there are no more digits in the dividend, we add a zero to the remainder making it 320, and continue the process.

Advancing to step 11:
If we divide 320 by 38, we get 8 and a remainder of 16.
Write down 8 as next digit of the result. 
Result so far: 26243.97368
Subtract 304 from 320 to get 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Step 12:
The number 38 fits into 160 4 times, leaving a remainder of 8.
The next digit of our result is 4. 
Result so far: 26243.973684
If we subtract 152 from 160, we get 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Advancing to step 13:
38 can be fit into 80 2 times, resulting in a remainder of 4.
Put 2 as the next digit of the answer. 
Result so far: 26243.9736842
Deduct 76 from 80 and we're left with 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

On to step 14:
38 goes into 40 1 times with a remainder of 2.
The next digit of our result is 1. 
Result so far: 26243.97368421
If we subtract 38 from 40, we get 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

The final outcome is 26243.97368421, with a leftover of 2e-09.