We're dividing 40509474 by 402 
We want to divide 40509474 by 402.

Going ahead to step 1:
402 goes into 4 0 times with a remainder of 4.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtract 0 from 4 to get 4.
Grab the next digit (0) from the dividend, add it to 4, then carry on: 40 / 402

Step 2:
402 can be fit into 40 0 times, resulting in a remainder of 40.
Use 0 as the next digit of our solution. 
Result so far: 0.0
The remainder is 40 after subtracting 0 from 40.
Bring next digit (5) of the dividend behind the 40 and repeat the process: 405 / 402

Step 3:
If we divide 405 by 402, we get 1 and a remainder of 3.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
Subtract 402 from 405 to get 3.
Fetch the next digit (0) from the dividend, attach it to 3 and continue: 30 / 402

Advancing to step 4:
402 can be fit into 30 0 times, resulting in a remainder of 30.
Record the quotient 0 as the next digit in the result. 
Result so far: 10.0
If we subtract 0 from 30, we get 30.
Grab the next digit (9) from the dividend, add it to 30, then carry on: 309 / 402

On to step 5:
When dividing 309 by 402, we get 0 with a remainder of 309.
Record the quotient 0 as the next digit in the result. 
Result so far: 100.0
The remainder is 309 after subtracting 0 from 309.
Take the next digit (4) from the dividend and append it to 309, then repeat: 3094 / 402

On to step 6:
402 goes into 3094 7 times with a remainder of 280.
Write down 7 as next digit of the result. 
Result so far: 1007.0
If we take 2814 away from 3094, we end up with 280.
Grab the next digit (7) from the dividend, add it to 280, then carry on: 2807 / 402

Advancing to step 7:
The number 402 fits into 2807 6 times, leaving a remainder of 395.
The number 6 becomes the next digit in our result. 
Result so far: 10076.0
If we take 2412 away from 2807, we end up with 395.
Fetch the next digit (4) from the dividend, attach it to 395 and continue: 3954 / 402

Moving on to step 8:
3954 divided by 402 is 9 with a remainder of 336.
The next digit of our result is 9. 
Result so far: 100769.0
The remainder is 336 after subtracting 3618 from 3954.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3360, and continue the process.

Going ahead to step 9:
The number 402 fits into 3360 8 times, leaving a remainder of 144.
Use 8 as the next digit of our solution. 
Result so far: 100769.8
The remainder is 144 after subtracting 3216 from 3360.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1440, and continue the process.

Moving on to step 10:
When dividing 1440 by 402, we get 3 with a remainder of 234.
Record the quotient 3 as the next digit in the result. 
Result so far: 100769.83
If we take 1206 away from 1440, we end up with 234.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2340, and continue the process.

Going ahead to step 11:
If we divide 2340 by 402, we get 5 and a remainder of 330.
Write down 5 as next digit of the result. 
Result so far: 100769.835
Deduct 2010 from 2340 and we're left with 330.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3300, and continue the process.

Advancing to step 12:
The number 402 fits into 3300 8 times, leaving a remainder of 84.
The next digit of our result is 8. 
Result so far: 100769.8358
Subtracting 3216 from 3300 leaves us with 84.
Since there are no more digits in the dividend, we add a zero to the remainder making it 840, and continue the process.

Moving on to step 13:
The number 402 fits into 840 2 times, leaving a remainder of 36.
The next digit of our result is 2. 
Result so far: 100769.83582
If we subtract 804 from 840, we get 36.
Since there are no more digits in the dividend, we add a zero to the remainder making it 360, and continue the process.

On to step 14:
360 divided by 402 is 0 with a remainder of 360.
The next digit of our result is 0. 
Result so far: 100769.83582
If we subtract 0 from 360, we get 360.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3600, and continue the process.

Advancing to step 15:
When dividing 3600 by 402, we get 8 with a remainder of 384.
Use 8 as the next digit of our solution. 
Result so far: 100769.8358208
If we take 3216 away from 3600, we end up with 384.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3840, and continue the process.

Let's proceed to step 16:
3840 divided by 402 is 9 with a remainder of 222.
Put 9 as the next digit of the answer. 
Result so far: 100769.83582089
Subtracting 3618 from 3840 leaves us with 222.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2220, and continue the process.

In conclusion, the division gives 100769.83582089 with a balance of 2.22e-07.