We're dividing 495289 by 40 
Let's see how many times 40 fits into 495289.

On to step 1:
When dividing 4 by 40, we get 0 with a remainder of 4.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we subtract 0 from 4, we get 4.
Fetch the next digit (9) from the dividend, attach it to 4 and continue: 49 / 40

Going ahead to step 2:
When dividing 49 by 40, we get 1 with a remainder of 9.
Use 1 as the next digit of our solution. 
Result so far: 1.0
If we subtract 40 from 49, we get 9.
Grab the next digit (5) from the dividend, add it to 9, then carry on: 95 / 40

Let's proceed to step 3:
If we divide 95 by 40, we get 2 and a remainder of 15.
Use 2 as the next digit of our solution. 
Result so far: 12.0
If we subtract 80 from 95, we get 15.
Include the next digit (2) from the dividend after 15, then repeat: 152 / 40

On to step 4:
40 can be fit into 152 3 times, resulting in a remainder of 32.
Record the quotient 3 as the next digit in the result. 
Result so far: 123.0
If we subtract 120 from 152, we get 32.
Fetch the next digit (8) from the dividend, attach it to 32 and continue: 328 / 40

Going ahead to step 5:
If we divide 328 by 40, we get 8 and a remainder of 8.
Record the quotient 8 as the next digit in the result. 
Result so far: 1238.0
If we take 320 away from 328, we end up with 8.
Include the next digit (9) from the dividend after 8, then repeat: 89 / 40

On to step 6:
When dividing 89 by 40, we get 2 with a remainder of 9.
Put 2 as the next digit of the answer. 
Result so far: 12382.0
Subtracting 80 from 89 leaves us with 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

On to step 7:
90 divided by 40 is 2 with a remainder of 10.
The next digit of our result is 2. 
Result so far: 12382.2
If we take 80 away from 90, we end up with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Step 8:
When dividing 100 by 40, we get 2 with a remainder of 20.
Put 2 as the next digit of the answer. 
Result so far: 12382.22
The remainder is 20 after subtracting 80 from 100.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

The quotient of the division is 12382.22, and the remainder is 0.02.