We look at the division of 40218 by 38 
We want to divide 40218 by 38.

Let's proceed to step 1:
4 divided by 38 is 0 with a remainder of 4.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we take 0 away from 4, we end up with 4.
Fetch the next digit (0) from the dividend, attach it to 4 and continue: 40 / 38

On to step 2:
The number 38 fits into 40 1 times, leaving a remainder of 2.
Put 1 as the next digit of the answer. 
Result so far: 1.0
The remainder is 2 after subtracting 38 from 40.
Include the next digit (2) from the dividend after 2, then repeat: 22 / 38

Step 3:
38 can be fit into 22 0 times, resulting in a remainder of 22.
Record the quotient 0 as the next digit in the result. 
Result so far: 10.0
Deduct 0 from 22 and we're left with 22.
Fetch the next digit (1) from the dividend, attach it to 22 and continue: 221 / 38

Let's proceed to step 4:
When dividing 221 by 38, we get 5 with a remainder of 31.
Write down 5 as next digit of the result. 
Result so far: 105.0
Subtract 190 from 221 to get 31.
Fetch the next digit (8) from the dividend, attach it to 31 and continue: 318 / 38

Let's proceed to step 5:
38 goes into 318 8 times with a remainder of 14.
Write down 8 as next digit of the result. 
Result so far: 1058.0
If we take 304 away from 318, we end up 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.

Advancing to step 6:
38 goes into 140 3 times with a remainder of 26.
Record the quotient 3 as the next digit in the result. 
Result so far: 1058.3
If we subtract 114 from 140, we 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.

On to step 7:
When dividing 260 by 38, we get 6 with a remainder of 32.
Write down 6 as next digit of the result. 
Result so far: 1058.36
Subtracting 228 from 260 leaves us 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.

Let's proceed to step 8:
38 can be fit into 320 8 times, resulting in a remainder of 16.
Record the quotient 8 as the next digit in the result. 
Result so far: 1058.368
If we subtract 304 from 320, we 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.

On to step 9:
The number 38 fits into 160 4 times, leaving a remainder of 8.
The number 4 becomes the next digit in our result. 
Result so far: 1058.3684
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.

Going ahead to step 10:
80 divided by 38 is 2 with a remainder of 4.
Use 2 as the next digit of our solution. 
Result so far: 1058.36842
If we take 76 away from 80, we end up 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.

Moving on to step 11:
The number 38 fits into 40 1 times, leaving a remainder of 2.
Write down 1 as next digit of the result. 
Result so far: 1058.368421
Subtracting 38 from 40 leaves us with 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Advancing to step 12:
38 can be fit into 20 0 times, resulting in a remainder of 20.
Write down 0 as next digit of the result. 
Result so far: 1058.368421
Subtracting 0 from 20 leaves us with 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 13:
200 divided by 38 is 5 with a remainder of 10.
Record the quotient 5 as the next digit in the result. 
Result so far: 1058.36842105
Subtracting 190 from 200 leaves us with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Our division results in 1058.36842105 with a remaining 1e-08.