Well, I suppose many people do not know of these "mental math tricks".
To get 10% of a number, just move the decimal left: 10% of 40 -> 4.0.
To get 5% of this number, get 10% first, then halve it. It is the half of 10%, which in this case would be 2.0.
If you want to do this on a computer / calculator, you simply do: 40 * 0.10 for 10% or 0.05 for 5%. I was a very young kid when I learned to do this on a calculator, and I absolutely loved it!