40838 ÷ 21 
We're looking to find how many times 21 goes into 40838.

Advancing to step 1:
21 goes into 4 0 times with a remainder of 4.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 4, we get 4.
Include the next digit (0) from the dividend after 4, then repeat: 40 / 21

Step 2:
If we divide 40 by 21, we get 1 and a remainder of 19.
Use 1 as the next digit of our solution. 
Result so far: 1.0
If we take 21 away from 40, we end up with 19.
Take the next digit (8) from the dividend and append it to 19, then repeat: 198 / 21

Advancing to step 3:
21 goes into 198 9 times with a remainder of 9.
Write down 9 as next digit of the result. 
Result so far: 19.0
Deduct 189 from 198 and we're left with 9.
Fetch the next digit (3) from the dividend, attach it to 9 and continue: 93 / 21

Going ahead to step 4:
93 divided by 21 is 4 with a remainder of 9.
Use 4 as the next digit of our solution. 
Result so far: 194.0
Subtracting 84 from 93 leaves us with 9.
Take the next digit (8) from the dividend and append it to 9, then repeat: 98 / 21

Let's proceed to step 5:
21 can be fit into 98 4 times, resulting in a remainder of 14.
Record the quotient 4 as the next digit in the result. 
Result so far: 1944.0
If we subtract 84 from 98, 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.

Advancing to step 6:
21 can be fit into 140 6 times, resulting in a remainder of 14.
Write down 6 as next digit of the result. 
Result so far: 1944.6
Subtract 126 from 140 to 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.

Going ahead to step 7:
21 can be fit into 140 6 times, resulting in a remainder of 14.
The next digit of our result is 6. 
Result so far: 1944.66
If we take 126 away from 140, 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.

In conclusion, the division gives 1944.66 with a balance of 0.014.