CAD risk calculators are based on complicated algorithms derived from research studies. Generally, these research studies follow people over many years and compare people who do and don't experience "endpoints" (like heart attack, stroke, and death). Statistical methods are used to determine the relationship of each risk factor with the endpoints, and how well each risk factor predicts the endpoints. The risk factors can be weighted to have greater or lesser importance in the risk calculator.