The median is a useful measure of location in both symmetric and asymmetric distributions. A distribution-free confidence interval for a general linear contrast of population medians is proposed. The proposed CI is easy to compute, and unlike the classic nonparametric procedures, does not assume identical (location-shifted) distributions. Special cases of the general linear contrast can be used to make pair-wise comparisons in single-factor studies; estimate main effects, interaction effects or simple effects in factorial designs; and estimate the slope in studies with a quantitative factor. The proposed confidence interval also can be used to test a broad class of hypotheses including directional two-sided tests, finite interval tests, and tests of ordered (strict and partial) alternatives. The distribution-free confidence interval does not require preliminary tests for normality, outliers or equal variances that often precede an analysis of means.