The chapter introduces the concept of least-squares means (LS means) in the context of linear models, emphasizing their utility in summarizing factor effects and testing linear contrasts. LS means are predictions or averages over a reference grid, which is defined by the levels of predictor variables. The lsmeans package, available in R, simplifies the computation of LS means and contrasts for various models fitted by R core packages. The package supports a wide range of models, including those with multiple response variables and ordinal data. Examples illustrate how to use the package to analyze data from experiments, such as sales of oranges and housing satisfaction, demonstrating the computation of LS means, contrasts, and confidence intervals. The chapter also discusses the handling of messy data, the use of contrasts for pairwise comparisons, and the integration with other packages like multcomp for simultaneous hypothesis testing.The chapter introduces the concept of least-squares means (LS means) in the context of linear models, emphasizing their utility in summarizing factor effects and testing linear contrasts. LS means are predictions or averages over a reference grid, which is defined by the levels of predictor variables. The lsmeans package, available in R, simplifies the computation of LS means and contrasts for various models fitted by R core packages. The package supports a wide range of models, including those with multiple response variables and ordinal data. Examples illustrate how to use the package to analyze data from experiments, such as sales of oranges and housing satisfaction, demonstrating the computation of LS means, contrasts, and confidence intervals. The chapter also discusses the handling of messy data, the use of contrasts for pairwise comparisons, and the integration with other packages like multcomp for simultaneous hypothesis testing.