Use “fact” only in reference to matters capable of being proven; do not use it in matters of subjective judgment:
It is a fact that the output of many oil wells is a mixture of both oil and salt water.
Use “factor” literally to describe a relationship in which one thing is an actual agent for another thing:
Porosity and permeability are factors in the level of groundwater pollution.
Depending on the context, generally acceptable synonyms for factor are “element,” “ingredient,” “component,” and “constituent.”