502513 ÷ 40 
We want to divide 502513 by 40.

On to step 1:
The number 40 fits into 5 0 times, leaving a remainder of 5.
The next digit of our result is 0. 
Result so far: 0.0
Deduct 0 from 5 and we're left with 5.
Grab the next digit (0) from the dividend, add it to 5, then carry on: 50 / 40

Step 2:
The number 40 fits into 50 1 times, leaving a remainder of 10.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
Subtracting 40 from 50 leaves us with 10.
Take the next digit (2) from the dividend and append it to 10, then repeat: 102 / 40

Step 3:
The number 40 fits into 102 2 times, leaving a remainder of 22.
Use 2 as the next digit of our solution. 
Result so far: 12.0
If we take 80 away from 102, we end up with 22.
Take the next digit (5) from the dividend and append it to 22, then repeat: 225 / 40

Step 4:
When dividing 225 by 40, we get 5 with a remainder of 25.
Use 5 as the next digit of our solution. 
Result so far: 125.0
Deduct 200 from 225 and we're left with 25.
Fetch the next digit (1) from the dividend, attach it to 25 and continue: 251 / 40

Step 5:
251 divided by 40 is 6 with a remainder of 11.
Write down 6 as next digit of the result. 
Result so far: 1256.0
Deduct 240 from 251 and we're left with 11.
Include the next digit (3) from the dividend after 11, then repeat: 113 / 40

Let's proceed to step 6:
The number 40 fits into 113 2 times, leaving a remainder of 33.
The next digit of our result is 2. 
Result so far: 12562.0
Deduct 80 from 113 and we're left with 33.
Since there are no more digits in the dividend, we add a zero to the remainder making it 330, and continue the process.

Moving on to step 7:
When dividing 330 by 40, we get 8 with a remainder of 10.
Record the quotient 8 as the next digit in the result. 
Result so far: 12562.8
If we subtract 320 from 330, we get 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Going ahead to step 8:
When dividing 100 by 40, we get 2 with a remainder of 20.
Record the quotient 2 as the next digit in the result. 
Result so far: 12562.82
If we subtract 80 from 100, we get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Step 9:
If we divide 200 by 40, we get 5 and a remainder of 0.
The next digit of our result is 5. 
Result so far: 12562.825
Subtract 200 from 200 to 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.

Going ahead to step 10:
0 divided by 40 is 0 with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 12562.825
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.

Advancing to step 11:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 12562.825
Deduct 0 from 0 and we're left 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 12562.825, and the remainder is 0.0.