We're dividing 40489957 by 793 
Let's see how many times 793 fits into 40489957.

Step 1:
If we divide 4 by 793, we get 0 and a remainder of 4.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Deduct 0 from 4 and we're left with 4.
Take the next digit (0) from the dividend and append it to 4, then repeat: 40 / 793

Going ahead to step 2:
If we divide 40 by 793, we get 0 and a remainder of 40.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtracting 0 from 40 leaves us with 40.
Grab the next digit (4) from the dividend, add it to 40, then carry on: 404 / 793

Moving on to step 3:
If we divide 404 by 793, we get 0 and a remainder of 404.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 404, we get 404.
Include the next digit (8) from the dividend after 404, then repeat: 4048 / 793

Step 4:
When dividing 4048 by 793, we get 5 with a remainder of 83.
Write down 5 as next digit of the result. 
Result so far: 5.0
If we subtract 3965 from 4048, we get 83.
Include the next digit (9) from the dividend after 83, then repeat: 839 / 793

Going ahead to step 5:
839 divided by 793 is 1 with a remainder of 46.
Use 1 as the next digit of our solution. 
Result so far: 51.0
The remainder is 46 after subtracting 793 from 839.
Fetch the next digit (9) from the dividend, attach it to 46 and continue: 469 / 793

On to step 6:
469 divided by 793 is 0 with a remainder of 469.
Record the quotient 0 as the next digit in the result. 
Result so far: 510.0
Subtracting 0 from 469 leaves us with 469.
Append the next digit (5) from the dividend to 469 and continue with: 4695 / 793

Step 7:
793 can be fit into 4695 5 times, resulting in a remainder of 730.
The next digit of our result is 5. 
Result so far: 5105.0
The remainder is 730 after subtracting 3965 from 4695.
Fetch the next digit (7) from the dividend, attach it to 730 and continue: 7307 / 793

Moving on to step 8:
793 can be fit into 7307 9 times, resulting in a remainder of 170.
Record the quotient 9 as the next digit in the result. 
Result so far: 51059.0
Deduct 7137 from 7307 and we're left with 170.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1700, and continue the process.

Let's proceed to step 9:
1700 divided by 793 is 2 with a remainder of 114.
The number 2 becomes the next digit in our result. 
Result so far: 51059.2
If we subtract 1586 from 1700, we get 114.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1140, and continue the process.

Going ahead to step 10:
793 can be fit into 1140 1 times, resulting in a remainder of 347.
Write down 1 as next digit of the result. 
Result so far: 51059.21
Subtract 793 from 1140 to get 347.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3470, and continue the process.

Advancing to step 11:
The number 793 fits into 3470 4 times, leaving a remainder of 298.
Use 4 as the next digit of our solution. 
Result so far: 51059.214
Subtracting 3172 from 3470 leaves us with 298.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2980, and continue the process.

Going ahead to step 12:
793 goes into 2980 3 times with a remainder of 601.
The number 3 becomes the next digit in our result. 
Result so far: 51059.2143
Subtracting 2379 from 2980 leaves us with 601.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6010, and continue the process.

Let's proceed to step 13:
793 goes into 6010 7 times with a remainder of 459.
Write down 7 as next digit of the result. 
Result so far: 51059.21437
Subtract 5551 from 6010 to get 459.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4590, and continue the process.

Going ahead to step 14:
The number 793 fits into 4590 5 times, leaving a remainder of 625.
The number 5 becomes the next digit in our result. 
Result so far: 51059.214375
Subtract 3965 from 4590 to get 625.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6250, and continue the process.

Going ahead to step 15:
When dividing 6250 by 793, we get 7 with a remainder of 699.
Put 7 as the next digit of the answer. 
Result so far: 51059.2143757
Subtract 5551 from 6250 to get 699.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6990, and continue the process.

Moving on to step 16:
6990 divided by 793 is 8 with a remainder of 646.
The next digit of our result is 8. 
Result so far: 51059.21437578
Subtracting 6344 from 6990 leaves us with 646.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6460, and continue the process.

The quotient of the division is 51059.21437578, and the remainder is 6.46e-07.