The formula for simple interest (SI) is:
\[ SI = \frac{P \times R \times T}{100} \]
Given:
Substituting these values into the formula:
\[ 8000 = \frac{40000 \times 10 \times T}{100} \]
Rearranging the equation:
\[ 8000 = 4000T \]
\[ T = \frac{8000}{4000} = 2 \]
The duration of the investment is 2 years.