We divide 519865 by 40
The aim is to understand the frequency of 40 in 519865.

Moving on to step 1:
When dividing 5 by 40, we get 0 with a remainder of 5.
Use 0 as the next digit of our solution. 
Result so far: 0.0
The remainder is 5 after subtracting 0 from 5.
Fetch the next digit (1) from the dividend, attach it to 5 and continue: 51 / 40

Advancing to step 2:
The number 40 fits into 51 1 times, leaving a remainder of 11.
Put 1 as the next digit of the answer. 
Result so far: 1.0
If we subtract 40 from 51, we get 11.
Bring next digit (9) of the dividend behind the 11 and repeat the process: 119 / 40

Let's proceed to step 3:
When dividing 119 by 40, we get 2 with a remainder of 39.
Put 2 as the next digit of the answer. 
Result so far: 12.0
Deduct 80 from 119 and we're left with 39.
Bring next digit (8) of the dividend behind the 39 and repeat the process: 398 / 40

Step 4:
398 divided by 40 is 9 with a remainder of 38.
Write down 9 as next digit of the result. 
Result so far: 129.0
Deduct 360 from 398 and we're left with 38.
Grab the next digit (6) from the dividend, add it to 38, then carry on: 386 / 40

Advancing to step 5:
40 goes into 386 9 times with a remainder of 26.
Record the quotient 9 as the next digit in the result. 
Result so far: 1299.0
If we take 360 away from 386, we end up with 26.
Append the next digit (5) from the dividend to 26 and continue with: 265 / 40

Step 6:
40 can be fit into 265 6 times, resulting in a remainder of 25.
Use 6 as the next digit of our solution. 
Result so far: 12996.0
Subtract 240 from 265 to get 25.
Since there are no more digits in the dividend, we add a zero to the remainder making it 250, and continue the process.

On to step 7:
The number 40 fits into 250 6 times, leaving a remainder of 10.
Write down 6 as next digit of the result. 
Result so far: 12996.6
Subtract 240 from 250 to get 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Let's proceed to step 8:
The number 40 fits into 100 2 times, leaving a remainder of 20.
Put 2 as the next digit of the answer. 
Result so far: 12996.62
Subtract 80 from 100 to get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Advancing to step 9:
When dividing 200 by 40, we get 5 with a remainder of 0.
Put 5 as the next digit of the answer. 
Result so far: 12996.625
Subtracting 200 from 200 leaves us 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.

Let's proceed to step 10:
If we divide 0 by 40, we get 0 and a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 12996.625
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.

On to step 11:
40 can be fit into 0 0 times, resulting in a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 12996.625
Deduct 0 from 0 and we're left 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.

The quotient of the division is 12996.625, and the remainder is 0.0.