We're dividing 150987 by 40 
We want to divide 150987 by 40.

Let's proceed to step 1:
The number 40 fits into 1 0 times, leaving a remainder of 1.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtracting 0 from 1 leaves us with 1.
Grab the next digit (5) from the dividend, add it to 1, then carry on: 15 / 40

On to step 2:
40 can be fit into 15 0 times, resulting in a remainder of 15.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Subtract 0 from 15 to get 15.
Grab the next digit (0) from the dividend, add it to 15, then carry on: 150 / 40

Advancing to step 3:
40 can be fit into 150 3 times, resulting in a remainder of 30.
The next digit of our result is 3. 
Result so far: 3.0
Deduct 120 from 150 and we're left with 30.
Bring next digit (9) of the dividend behind the 30 and repeat the process: 309 / 40

Moving on to step 4:
The number 40 fits into 309 7 times, leaving a remainder of 29.
Use 7 as the next digit of our solution. 
Result so far: 37.0
If we take 280 away from 309, we end up with 29.
Bring next digit (8) of the dividend behind the 29 and repeat the process: 298 / 40

Step 5:
40 goes into 298 7 times with a remainder of 18.
Put 7 as the next digit of the answer. 
Result so far: 377.0
If we take 280 away from 298, we end up with 18.
Bring next digit (7) of the dividend behind the 18 and repeat the process: 187 / 40

Let's proceed to step 6:
40 goes into 187 4 times with a remainder of 27.
Write down 4 as next digit of the result. 
Result so far: 3774.0
Deduct 160 from 187 and we're left with 27.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Moving on to step 7:
The number 40 fits into 270 6 times, leaving a remainder of 30.
Write down 6 as next digit of the result. 
Result so far: 3774.6
The remainder is 30 after subtracting 240 from 270.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Let's proceed to step 8:
40 can be fit into 300 7 times, resulting in a remainder of 20.
Write down 7 as next digit of the result. 
Result so far: 3774.67
If we take 280 away from 300, 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 9:
40 can be fit into 200 5 times, resulting in a remainder of 0.
The next digit of our result is 5. 
Result so far: 3774.675
If we subtract 200 from 200, 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.

Let's proceed to step 10:
0 divided by 40 is 0 with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 3774.675
The remainder is 0 after subtracting 0 from 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Step 11:
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: 3774.675
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.

The quotient of the division is 3774.675, and the remainder is 0.0.