51289 ÷ 40 
We want to figure out the number of times 51289 can be divided 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
If we subtract 0 from 5, we get 5.
Take the next digit (1) from the dividend and append it to 5, then repeat: 51 / 40

Let's proceed to step 2:
When dividing 51 by 40, we get 1 with a remainder of 11.
Put 1 as the next digit of the answer. 
Result so far: 1.0
Deduct 40 from 51 and we're left with 11.
Fetch the next digit (2) from the dividend, attach it to 11 and continue: 112 / 40

Let's proceed to step 3:
112 divided by 40 is 2 with a remainder of 32.
The number 2 becomes the next digit in our result. 
Result so far: 12.0
If we subtract 80 from 112, we get 32.
Grab the next digit (8) from the dividend, add it to 32, then carry on: 328 / 40

On to step 4:
40 can be fit into 328 8 times, resulting in a remainder of 8.
Use 8 as the next digit of our solution. 
Result so far: 128.0
Subtract 320 from 328 to get 8.
Grab the next digit (9) from the dividend, add it to 8, then carry on: 89 / 40

Step 5:
If we divide 89 by 40, we get 2 and a remainder of 9.
Use 2 as the next digit of our solution. 
Result so far: 1282.0
The remainder is 9 after subtracting 80 from 89.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Advancing to step 6:
If we divide 90 by 40, we get 2 and a remainder of 10.
Write down 2 as next digit of the result. 
Result so far: 1282.2
The remainder is 10 after subtracting 80 from 90.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Advancing to step 7:
If we divide 100 by 40, we get 2 and a remainder of 20.
Use 2 as the next digit of our solution. 
Result so far: 1282.22
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.

Our division results in 1282.22 with a remaining 0.02.