40987994 ÷ 861 
Let's see how many times 861 fits into 40987994.

Advancing to step 1:
When dividing 4 by 861, we get 0 with a remainder of 4.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
The remainder is 4 after subtracting 0 from 4.
Bring next digit (0) of the dividend behind the 4 and repeat the process: 40 / 861

Moving on to step 2:
When dividing 40 by 861, we get 0 with a remainder of 40.
Write down 0 as next digit of the result. 
Result so far: 0.0
Deduct 0 from 40 and we're left with 40.
Fetch the next digit (9) from the dividend, attach it to 40 and continue: 409 / 861

Going ahead to step 3:
When dividing 409 by 861, we get 0 with a remainder of 409.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtract 0 from 409 to get 409.
Take the next digit (8) from the dividend and append it to 409, then repeat: 4098 / 861

Step 4:
861 can be fit into 4098 4 times, resulting in a remainder of 654.
The number 4 becomes the next digit in our result. 
Result so far: 4.0
If we take 3444 away from 4098, we end up with 654.
Take the next digit (7) from the dividend and append it to 654, then repeat: 6547 / 861

Let's proceed to step 5:
The number 861 fits into 6547 7 times, leaving a remainder of 520.
Use 7 as the next digit of our solution. 
Result so far: 47.0
Deduct 6027 from 6547 and we're left with 520.
Grab the next digit (9) from the dividend, add it to 520, then carry on: 5209 / 861

Advancing to step 6:
When dividing 5209 by 861, we get 6 with a remainder of 43.
Put 6 as the next digit of the answer. 
Result so far: 476.0
If we take 5166 away from 5209, we end up with 43.
Fetch the next digit (9) from the dividend, attach it to 43 and continue: 439 / 861

On to step 7:
439 divided by 861 is 0 with a remainder of 439.
Use 0 as the next digit of our solution. 
Result so far: 4760.0
Subtract 0 from 439 to get 439.
Bring next digit (4) of the dividend behind the 439 and repeat the process: 4394 / 861

Going ahead to step 8:
If we divide 4394 by 861, we get 5 and a remainder of 89.
Record the quotient 5 as the next digit in the result. 
Result so far: 47605.0
The remainder is 89 after subtracting 4305 from 4394.
Since there are no more digits in the dividend, we add a zero to the remainder making it 890, and continue the process.

Moving on to step 9:
When dividing 890 by 861, we get 1 with a remainder of 29.
Use 1 as the next digit of our solution. 
Result so far: 47605.1
Deduct 861 from 890 and we're left 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.

Let's proceed to step 10:
861 goes into 290 0 times with a remainder of 290.
Record the quotient 0 as the next digit in the result. 
Result so far: 47605.1
Deduct 0 from 290 and we're left with 290.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2900, and continue the process.

On to step 11:
861 can be fit into 2900 3 times, resulting in a remainder of 317.
The number 3 becomes the next digit in our result. 
Result so far: 47605.103
Deduct 2583 from 2900 and we're left with 317.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3170, and continue the process.

On to step 12:
The number 861 fits into 3170 3 times, leaving a remainder of 587.
The next digit of our result is 3. 
Result so far: 47605.1033
The remainder is 587 after subtracting 2583 from 3170.
Since there are no more digits in the dividend, we add a zero to the remainder making it 5870, and continue the process.

After the division, we end up with 47605.1033 and a remainder of 0.00587.