Quantification of the impact of exposure to modifiable risk factors on a particular outcome at the population level is a fundamental public health issue. In cohort studies, the population attributable fraction (PAF) is used to assess the proportion of the outcome that is attributable to exposure to certain risk factors in a given population during a certain time interval. This is done by combining information about the prevalence of the risk factor in the population with estimates of the strength of the association between the risk factor and the outcome. In case of mortality, the PAF demonstrates what proportion of mortality can be delayed during the given follow-up time. However, literature on carrying out model-based estimation of PAF and its variance in cohort studies while properly taking follow-up time into account is still scarce. In this article, the authors present formulas for estimation of PAF, its variance, and its confidence interval using the piecewise constant hazards model and apply a SAS macro created for the estimation of PAF (SAS Institute Inc., Cary, North Carolina) to estimate the mortality attributable to some common risk factors.