Let's divide 514640 by 40
We want to figure out the number of times 514640 can be divided by 40.

Moving on to step 1:
When dividing 5 by 40, we get 0 with a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtracting 0 from 5 leaves us with 5.
Grab the next digit (1) from the dividend, add it to 5, then carry on: 51 / 40

Going ahead to step 2:
When dividing 51 by 40, we get 1 with a remainder of 11.
Write down 1 as next digit of the result. 
Result so far: 1.0
If we take 40 away from 51, we end up with 11.
Include the next digit (4) from the dividend after 11, then repeat: 114 / 40

Moving on to step 3:
40 can be fit into 114 2 times, resulting in a remainder of 34.
Write down 2 as next digit of the result. 
Result so far: 12.0
Deduct 80 from 114 and we're left with 34.
Grab the next digit (6) from the dividend, add it to 34, then carry on: 346 / 40

Going ahead to step 4:
The number 40 fits into 346 8 times, leaving a remainder of 26.
The next digit of our result is 8. 
Result so far: 128.0
Subtracting 320 from 346 leaves us with 26.
Append the next digit (4) from the dividend to 26 and continue with: 264 / 40

On to step 5:
When dividing 264 by 40, we get 6 with a remainder of 24.
Use 6 as the next digit of our solution. 
Result so far: 1286.0
Subtracting 240 from 264 leaves us with 24.
Take the next digit (0) from the dividend and append it to 24, then repeat: 240 / 40

Going ahead to step 6:
40 goes into 240 6 times with a remainder of 0.
Put 6 as the next digit of the answer. 
Result so far: 12866.0
If we take 240 away from 240, we end up 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.

Going ahead to step 7:
When dividing 0 by 40, we get 0 with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 12866.0
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.

Moving on to step 8:
The number 40 fits into 0 0 times, leaving a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 12866.0
If we take 0 away from 0, we end up 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 12866.0, and the remainder is 0.0.