We divide 401858 by 40
We're looking to find how many times 40 goes into 401858.

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

Step 2:
40 goes into 40 1 times with a remainder of 0.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
Subtract 40 from 40 to get 0.
Include the next digit (1) from the dividend after 0, then repeat: 1 / 40

Moving on to step 3:
40 goes into 1 0 times with a remainder of 1.
Write down 0 as next digit of the result. 
Result so far: 10.0
Subtracting 0 from 1 leaves us with 1.
Bring next digit (8) of the dividend behind the 1 and repeat the process: 18 / 40

Moving on to step 4:
40 can be fit into 18 0 times, resulting in a remainder of 18.
Put 0 as the next digit of the answer. 
Result so far: 100.0
If we take 0 away from 18, we end up with 18.
Take the next digit (5) from the dividend and append it to 18, then repeat: 185 / 40

Let's proceed to step 5:
40 goes into 185 4 times with a remainder of 25.
The number 4 becomes the next digit in our result. 
Result so far: 1004.0
If we subtract 160 from 185, we get 25.
Take the next digit (8) from the dividend and append it to 25, then repeat: 258 / 40

Moving on to step 6:
The number 40 fits into 258 6 times, leaving a remainder of 18.
Put 6 as the next digit of the answer. 
Result so far: 10046.0
The remainder is 18 after subtracting 240 from 258.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

Moving on to step 7:
The number 40 fits into 180 4 times, leaving a remainder of 20.
Write down 4 as next digit of the result. 
Result so far: 10046.4
If we take 160 away from 180, we end up 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.

On to step 8:
40 can be fit into 200 5 times, resulting in a remainder of 0.
Put 5 as the next digit of the answer. 
Result so far: 10046.45
If we take 200 away from 200, 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.

Moving on to step 9:
If we divide 0 by 40, we get 0 and a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 10046.45
Subtracting 0 from 0 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.

On to step 10:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 10046.45
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.

After the division, we end up with 10046.45 and a remainder of 0.0.