We divide 40167023 by 997
Let's see how many times 997 fits into 40167023.

Going ahead to step 1:
997 goes into 4 0 times with a remainder of 4.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we subtract 0 from 4, we get 4.
Append the next digit (0) from the dividend to 4 and continue with: 40 / 997

Step 2:
40 divided by 997 is 0 with a remainder of 40.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we subtract 0 from 40, we get 40.
Fetch the next digit (1) from the dividend, attach it to 40 and continue: 401 / 997

On to step 3:
401 divided by 997 is 0 with a remainder of 401.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtracting 0 from 401 leaves us with 401.
Include the next digit (6) from the dividend after 401, then repeat: 4016 / 997

Moving on to step 4:
The number 997 fits into 4016 4 times, leaving a remainder of 28.
The next digit of our result is 4. 
Result so far: 4.0
Deduct 3988 from 4016 and we're left with 28.
Append the next digit (7) from the dividend to 28 and continue with: 287 / 997

On to step 5:
997 can be fit into 287 0 times, resulting in a remainder of 287.
The next digit of our result is 0. 
Result so far: 40.0
Subtracting 0 from 287 leaves us with 287.
Append the next digit (0) from the dividend to 287 and continue with: 2870 / 997

Step 6:
997 goes into 2870 2 times with a remainder of 876.
Write down 2 as next digit of the result. 
Result so far: 402.0
Deduct 1994 from 2870 and we're left with 876.
Bring next digit (2) of the dividend behind the 876 and repeat the process: 8762 / 997

Advancing to step 7:
When dividing 8762 by 997, we get 8 with a remainder of 786.
Write down 8 as next digit of the result. 
Result so far: 4028.0
If we take 7976 away from 8762, we end up with 786.
Include the next digit (3) from the dividend after 786, then repeat: 7863 / 997

Going ahead to step 8:
If we divide 7863 by 997, we get 7 and a remainder of 884.
Use 7 as the next digit of our solution. 
Result so far: 40287.0
If we take 6979 away from 7863, we end up with 884.
Since there are no more digits in the dividend, we add a zero to the remainder making it 8840, and continue the process.

Let's proceed to step 9:
997 can be fit into 8840 8 times, resulting in a remainder of 864.
The number 8 becomes the next digit in our result. 
Result so far: 40287.8
If we take 7976 away from 8840, we end up with 864.
Since there are no more digits in the dividend, we add a zero to the remainder making it 8640, and continue the process.

Moving on to step 10:
The number 997 fits into 8640 8 times, leaving a remainder of 664.
The number 8 becomes the next digit in our result. 
Result so far: 40287.88
Subtract 7976 from 8640 to get 664.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6640, and continue the process.

After the division, we end up with 40287.88 and a remainder of 0.664.