Here is a easy way to figure this out.
1 x 40
2 x 20
4 x 10
5 x 8
All the numbers you used to multiply are the factors.
1, 2, 4, 5, 8, 10, 20, 40 are your factors of 40
Hope I was able to help you. :-)