40178 ÷ 13 
We want to figure out the number of times 40178 can be divided by 13.

Let's proceed to step 1:
If we divide 4 by 13, we get 0 and a remainder of 4.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we take 0 away from 4, we end up with 4.
Append the next digit (0) from the dividend to 4 and continue with: 40 / 13

On to step 2:
40 divided by 13 is 3 with a remainder of 1.
Put 3 as the next digit of the answer. 
Result so far: 3.0
If we subtract 39 from 40, we get 1.
Bring next digit (1) of the dividend behind the 1 and repeat the process: 11 / 13

Advancing to step 3:
11 divided by 13 is 0 with a remainder of 11.
Use 0 as the next digit of our solution. 
Result so far: 30.0
Subtract 0 from 11 to get 11.
Grab the next digit (7) from the dividend, add it to 11, then carry on: 117 / 13

Advancing to step 4:
117 divided by 13 is 9 with a remainder of 0.
Record the quotient 9 as the next digit in the result. 
Result so far: 309.0
If we take 117 away from 117, we end up with 0.
Bring next digit (8) of the dividend behind the 0 and repeat the process: 8 / 13

Let's proceed to step 5:
If we divide 8 by 13, we get 0 and a remainder of 8.
The number 0 becomes the next digit in our result. 
Result so far: 3090.0
Subtracting 0 from 8 leaves us with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Going ahead to step 6:
When dividing 80 by 13, we get 6 with a remainder of 2.
Write down 6 as next digit of the result. 
Result so far: 3090.6
The remainder is 2 after subtracting 78 from 80.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Moving on to step 7:
The number 13 fits into 20 1 times, leaving a remainder of 7.
Write down 1 as next digit of the result. 
Result so far: 3090.61
The remainder is 7 after subtracting 13 from 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Advancing to step 8:
The number 13 fits into 70 5 times, leaving a remainder of 5.
The number 5 becomes the next digit in our result. 
Result so far: 3090.615
If we subtract 65 from 70, 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 9:
13 can be fit into 50 3 times, resulting in a remainder of 11.
Write down 3 as next digit of the result. 
Result so far: 3090.6153
The remainder is 11 after subtracting 39 from 50.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

Let's proceed to step 10:
13 goes into 110 8 times with a remainder of 6.
Record the quotient 8 as the next digit in the result. 
Result so far: 3090.61538
Deduct 104 from 110 and we're left with 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Moving on to step 11:
60 divided by 13 is 4 with a remainder of 8.
Write down 4 as next digit of the result. 
Result so far: 3090.615384
Subtracting 52 from 60 leaves us with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

On to step 12:
If we divide 80 by 13, we get 6 and a remainder of 2.
Use 6 as the next digit of our solution. 
Result so far: 3090.6153846
The remainder is 2 after subtracting 78 from 80.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

On to step 13:
The number 13 fits into 20 1 times, leaving a remainder of 7.
Record the quotient 1 as the next digit in the result. 
Result so far: 3090.61538461
If we take 13 away from 20, we end up with 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

After the division, we end up with 3090.61538461 and a remainder of 7e-09.