40845 ÷ 21 
We're looking to find how many times 21 goes into 40845.

Advancing to step 1:
If we divide 4 by 21, we get 0 and a remainder of 4.
The next digit of our result is 0. 
Result so far: 0.0
Subtracting 0 from 4 leaves us with 4.
Append the next digit (0) from the dividend to 4 and continue with: 40 / 21

Let's proceed to step 2:
The number 21 fits into 40 1 times, leaving a remainder of 19.
Write down 1 as next digit of the result. 
Result so far: 1.0
If we subtract 21 from 40, we get 19.
Bring next digit (8) of the dividend behind the 19 and repeat the process: 198 / 21

Going ahead to step 3:
198 divided by 21 is 9 with a remainder of 9.
Record the quotient 9 as the next digit in the result. 
Result so far: 19.0
Subtracting 189 from 198 leaves us with 9.
Take the next digit (4) from the dividend and append it to 9, then repeat: 94 / 21

On to step 4:
21 can be fit into 94 4 times, resulting in a remainder of 10.
Use 4 as the next digit of our solution. 
Result so far: 194.0
The remainder is 10 after subtracting 84 from 94.
Take the next digit (5) from the dividend and append it to 10, then repeat: 105 / 21

Let's proceed to step 5:
The number 21 fits into 105 5 times, leaving a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 1945.0
Deduct 105 from 105 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.

Let's proceed to step 6:
21 can be fit into 0 0 times, resulting in a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 1945.0
Subtracting 0 from 0 leaves us 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.

Let's proceed to step 7:
If we divide 0 by 21, we get 0 and a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 1945.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.

After the division, we end up with 1945.0 and a remainder of 0.0.