Let's divide 316171 by 5
The aim is to understand the frequency of 5 in 316171.

On to step 1:
The number 5 fits into 3 0 times, leaving a remainder of 3.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Deduct 0 from 3 and we're left with 3.
Append the next digit (1) from the dividend to 3 and continue with: 31 / 5

On to step 2:
When dividing 31 by 5, we get 6 with a remainder of 1.
Write down 6 as next digit of the result. 
Result so far: 6.0
If we take 30 away from 31, we end up with 1.
Grab the next digit (6) from the dividend, add it to 1, then carry on: 16 / 5

Let's proceed to step 3:
5 goes into 16 3 times with a remainder of 1.
Use 3 as the next digit of our solution. 
Result so far: 63.0
Deduct 15 from 16 and we're left with 1.
Fetch the next digit (1) from the dividend, attach it to 1 and continue: 11 / 5

Let's proceed to step 4:
11 divided by 5 is 2 with a remainder of 1.
Put 2 as the next digit of the answer. 
Result so far: 632.0
Deduct 10 from 11 and we're left with 1.
Take the next digit (7) from the dividend and append it to 1, then repeat: 17 / 5

On to step 5:
5 can be fit into 17 3 times, resulting in a remainder of 2.
Put 3 as the next digit of the answer. 
Result so far: 6323.0
If we subtract 15 from 17, we get 2.
Grab the next digit (1) from the dividend, add it to 2, then carry on: 21 / 5

Advancing to step 6:
5 goes into 21 4 times with a remainder of 1.
The next digit of our result is 4. 
Result so far: 63234.0
The remainder is 1 after subtracting 20 from 21.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

On to step 7:
5 goes into 10 2 times with a remainder of 0.
The number 2 becomes the next digit in our result. 
Result so far: 63234.2
If we take 10 away from 10, we end up 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.

On to step 8:
When dividing 0 by 5, we get 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 63234.2
If we subtract 0 from 0, we 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.

Step 9:
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: 63234.2
Subtract 0 from 0 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.

The final outcome is 63234.2, with a leftover of 0.0.