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

Going ahead to step 1:
When dividing 2 by 40, we get 0 with a remainder of 2.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtract 0 from 2 to get 2.
Grab the next digit (0) from the dividend, add it to 2, then carry on: 20 / 40

Step 2:
40 goes into 20 0 times with a remainder of 20.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we take 0 away from 20, we end up with 20.
Take the next digit (1) from the dividend and append it to 20, then repeat: 201 / 40

Let's proceed to step 3:
201 divided by 40 is 5 with a remainder of 1.
Use 5 as the next digit of our solution. 
Result so far: 5.0
Subtracting 200 from 201 leaves us with 1.
Bring next digit (7) of the dividend behind the 1 and repeat the process: 17 / 40

Step 4:
The number 40 fits into 17 0 times, leaving a remainder of 17.
Record the quotient 0 as the next digit in the result. 
Result so far: 50.0
The remainder is 17 after subtracting 0 from 17.
Bring next digit (3) of the dividend behind the 17 and repeat the process: 173 / 40

On to step 5:
40 goes into 173 4 times with a remainder of 13.
Use 4 as the next digit of our solution. 
Result so far: 504.0
If we take 160 away from 173, we end up with 13.
Since there are no more digits in the dividend, we add a zero to the remainder making it 130, and continue the process.

Moving on to step 6:
When dividing 130 by 40, we get 3 with a remainder of 10.
Write down 3 as next digit of the result. 
Result so far: 504.3
Subtracting 120 from 130 leaves us 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.

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

Going ahead to step 8:
The number 40 fits into 200 5 times, leaving a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 504.325
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.

Advancing to step 9:
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: 504.325
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.

Moving on to step 10:
If we divide 0 by 40, we get 0 and a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 504.325
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.

Our division results in 504.325 with a remaining 0.0.