The Wilcoxon-Mann-Whitney (WMW) test has been widely used as a nonparametric method to compare a continuous or ordinal variable between two groups. The WMW test essentially compares the competing probability
with 0.5, where X and Y are independent random variables from two distributions. The competing probability is naturally meaningful and equal to the area under the Receiver Operating Characteristics (ROC) curve. To construct a confidence interval (CI) for π, existing methods focused either only on continuous variables or only on ordinal variables. Furthermore, recently developed methods require complicated computation. In this paper, we propose a unified approach to construct a CI for π where the data can be continuous, ordinal, or a mixture of the two. The new approach gives a closed-form solution which is easy to compute. In addition, we propose a small sample modification which allows for constructing a CI even when the estimator for π is 0 or 1. Finally, simulation shows that the performance of the new method is comparable or superior to the existing methods.