The Vitamin D council list the following...
20 ng/ml 1000 IU
30 ng/ml 2200 IU
40 ng/ml 3600 IU
50 ng/ml 5300 IU
60 ng/ml 7400 IU
70 ng/ml 10100 IU
So to get to a minimum of 40 ng/mL you would need 3600 IU daily (see study below as to why this would be a minimum level*). This is just a general guide for dosage. Once you have reached your desired level of vitamin D check your levels twice a year to see if you need to increase or decrease the dosage.
Just to add, I had vitamin D resistance (took up to 10 000 IU and could not raise my vitamin D levels) due to magnesium deficiency. If you find you can't get your vitamin D levels up try taking magnesium supplements as well.
*"It is projected that raising the minimum year-around serum 25(OH)D level to 40 to 60 ng/mL (100-150 nmol/L) would prevent approximately 58,000 new cases of breast cancer and 49,000 new cases of colorectal cancer each year, and three fourths of deaths from these diseases in the United States and Canada, based on observational studies combined with a randomized trial."**
**Vitamin D for cancer prevention: global perspective. Ann Epidemiol. 2009 Jul;19(7):468-83. doi: 10.1016/j.annepidem.2009.03.021.