The magnetic field due to a short bar magnet at a distance \( r \) from the center is given by the formula:
\[
B = \frac{\mu_0 m}{2 \pi r^3}
\]
Where:
- \( \mu_0 = 4\pi \times 10^{-7} \, \text{T m/A} \) is the permeability of free space,
- \( m = 0.4 \, \text{Am}^2 \) is the magnetic moment of the bar magnet,
- \( r = 0.5 \, \text{m} \) is the distance from the center.
Substituting the values:
\[
B = \frac{4\pi \times 10^{-7} \times 0.4}{2 \pi (0.5)^3} = 6.4 \times 10^{-7} \, \text{T}
\]
Thus, the magnetic field is \( \boxed{6.4 \times 10^{-7} \, \text{T}} \).