YLL is calculated by taking the difference between a standard life expectancy at the age of death and the actual age at death. For example, if the standard life expectancy is 80 years and a person dies at 50, the YLL for that individual is 30 years. This calculation helps in identifying the impact of specific diseases or conditions on population health.