I present a program, censlope, for calculating confidence intervals for generalized Theil–Sen median (and other percentile) slopes (and per-unit ratios) of Y with respect to X. The confidence intervals are robust to the possibility that the conditional population distributions of Y , given different values of X, differ in ways other than location, such as having unequal variances. censlope uses the program somersd and is part of the somersd package. censlope can therefore estimate confounder-adjusted percentile slopes, limited to comparisons within strata defined by values of confounders, or by values of a propensity score representing multiple confounders. Iterative numerical methods have been implemented in the Mata language, enabling efficient calculation of percentile slopes and their confidence limits in large samples. I give example analyses from the auto dataset and from the Avon Longitudinal Study of Pregnancy and Childhood (ALSPAC).