In this paper, the estimation of the difference between two median survival times is considered when two treatment groups of right-censored data and the associated covariates are available. To identify the possible range of covariates over which the two treatments would produce different median survival times, two confidence bands for the difference as a function of the covariates are proposed under the stratified and treatment-specific Cox models, respectively. The results of a simulation study indicate that the latter generally maintains its confidence level and the former holds its confidence level and preserves a narrower width when the two treatments satisfy the stratified Cox model. An application of the proposed confidence bands is finally illustrated with a data set in a two-arm lung cancer study. ? 2013 Springer Science+Business Media New York.