When using simple linear regression, the slope can be calculated using the formula: Slope (β) = Σ[(X - μX)(Y - μY)] / Σ[(X - μX)²] Here, X represents the exposure variable, Y the outcome variable, and μX and μY are their respective means. This formula calculates the average change in the outcome variable for each unit change in the exposure variable.