We're dividing 400865 by 45 
We want to figure out the number of times 400865 can be divided by 45.

Let's proceed to step 1:
45 can be fit into 4 0 times, resulting in a remainder of 4.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Deduct 0 from 4 and we're left with 4.
Include the next digit (0) from the dividend after 4, then repeat: 40 / 45

Going ahead to step 2:
When dividing 40 by 45, we get 0 with a remainder of 40.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Deduct 0 from 40 and we're left with 40.
Append the next digit (0) from the dividend to 40 and continue with: 400 / 45

Let's proceed to step 3:
If we divide 400 by 45, we get 8 and a remainder of 40.
The number 8 becomes the next digit in our result. 
Result so far: 8.0
If we take 360 away from 400, we end up with 40.
Include the next digit (8) from the dividend after 40, then repeat: 408 / 45

Moving on to step 4:
When dividing 408 by 45, we get 9 with a remainder of 3.
Write down 9 as next digit of the result. 
Result so far: 89.0
If we subtract 405 from 408, we get 3.
Append the next digit (6) from the dividend to 3 and continue with: 36 / 45

Going ahead to step 5:
The number 45 fits into 36 0 times, leaving a remainder of 36.
The number 0 becomes the next digit in our result. 
Result so far: 890.0
If we subtract 0 from 36, we get 36.
Fetch the next digit (5) from the dividend, attach it to 36 and continue: 365 / 45

Step 6:
45 goes into 365 8 times with a remainder of 5.
Write down 8 as next digit of the result. 
Result so far: 8908.0
Subtracting 360 from 365 leaves us with 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Let's proceed to step 7:
45 goes into 50 1 times with a remainder of 5.
Put 1 as the next digit of the answer. 
Result so far: 8908.1
If we subtract 45 from 50, we get 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Step 8:
45 can be fit into 50 1 times, resulting in a remainder of 5.
Put 1 as the next digit of the answer. 
Result so far: 8908.11
Deduct 45 from 50 and we're left with 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Our division results in 8908.11 with a remaining 0.005.