40171181 ÷ 399 
Our goal is to divide 40171181 by 399.

Advancing to step 1:
399 can be fit into 4 0 times, resulting in a remainder of 4.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtract 0 from 4 to get 4.
Bring next digit (0) of the dividend behind the 4 and repeat the process: 40 / 399

On to step 2:
40 divided by 399 is 0 with a remainder of 40.
The next digit of our result is 0. 
Result so far: 0.0
Subtracting 0 from 40 leaves us with 40.
Grab the next digit (1) from the dividend, add it to 40, then carry on: 401 / 399

Advancing to step 3:
401 divided by 399 is 1 with a remainder of 2.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
If we subtract 399 from 401, we get 2.
Include the next digit (7) from the dividend after 2, then repeat: 27 / 399

On to step 4:
27 divided by 399 is 0 with a remainder of 27.
The next digit of our result is 0. 
Result so far: 10.0
The remainder is 27 after subtracting 0 from 27.
Append the next digit (1) from the dividend to 27 and continue with: 271 / 399

Moving on to step 5:
The number 399 fits into 271 0 times, leaving a remainder of 271.
Record the quotient 0 as the next digit in the result. 
Result so far: 100.0
If we subtract 0 from 271, we get 271.
Include the next digit (1) from the dividend after 271, then repeat: 2711 / 399

On to step 6:
399 goes into 2711 6 times with a remainder of 317.
The next digit of our result is 6. 
Result so far: 1006.0
The remainder is 317 after subtracting 2394 from 2711.
Include the next digit (8) from the dividend after 317, then repeat: 3178 / 399

Going ahead to step 7:
399 goes into 3178 7 times with a remainder of 385.
The next digit of our result is 7. 
Result so far: 10067.0
If we subtract 2793 from 3178, we get 385.
Include the next digit (1) from the dividend after 385, then repeat: 3851 / 399

Moving on to step 8:
399 goes into 3851 9 times with a remainder of 260.
The next digit of our result is 9. 
Result so far: 100679.0
Deduct 3591 from 3851 and we're left with 260.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2600, and continue the process.

Going ahead to step 9:
399 goes into 2600 6 times with a remainder of 206.
Record the quotient 6 as the next digit in the result. 
Result so far: 100679.6
If we subtract 2394 from 2600, we get 206.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2060, and continue the process.

On to step 10:
399 goes into 2060 5 times with a remainder of 65.
The next digit of our result is 5. 
Result so far: 100679.65
If we subtract 1995 from 2060, we get 65.
Since there are no more digits in the dividend, we add a zero to the remainder making it 650, and continue the process.

Going ahead to step 11:
The number 399 fits into 650 1 times, leaving a remainder of 251.
Use 1 as the next digit of our solution. 
Result so far: 100679.651
Deduct 399 from 650 and we're left with 251.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2510, and continue the process.

Moving on to step 12:
The number 399 fits into 2510 6 times, leaving a remainder of 116.
The number 6 becomes the next digit in our result. 
Result so far: 100679.6516
Subtracting 2394 from 2510 leaves us with 116.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1160, and continue the process.

Step 13:
399 goes into 1160 2 times with a remainder of 362.
Put 2 as the next digit of the answer. 
Result so far: 100679.65162
Subtracting 798 from 1160 leaves us with 362.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3620, and continue the process.

Advancing to step 14:
If we divide 3620 by 399, we get 9 and a remainder of 29.
Write down 9 as next digit of the result. 
Result so far: 100679.651629
If we take 3591 away from 3620, we end up with 29.
Since there are no more digits in the dividend, we add a zero to the remainder making it 290, and continue the process.

On to step 15:
290 divided by 399 is 0 with a remainder of 290.
Put 0 as the next digit of the answer. 
Result so far: 100679.651629
If we subtract 0 from 290, we get 290.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2900, and continue the process.

Advancing to step 16:
The number 399 fits into 2900 7 times, leaving a remainder of 107.
Put 7 as the next digit of the answer. 
Result so far: 100679.65162907
If we subtract 2793 from 2900, we get 107.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1070, and continue the process.

The final result is 100679.65162907 with a remainder of 1.07e-07.