The Wilcoxon rank sum test is widely used for two-group comparisons for nonnormal data. An assumption of this test is independence of sampling units both between and within groups. In ophthalmology, data are often collected on two eyes of an individual, which are highly correlated. In ophthalmological clinical trials, randomization is usually performed at the subject level, but the unit of analysis is the eye. If the eye is used as the unit of analysis, then a modification to the usual Wilcoxon rank sum variance formula must be made to account for the within-cluster dependence. For some clustered data designs, where the unit of analysis is the subunit, group membership may be defined at the subunit level. For example, in some randomized ophthalmologic clinical trials, different treatments may be applied to fellow eyes of some patients, while the same treatment may be applied to fellow eyes of other patients. In general, binary eye-specific covariates may be present (scored as exposed or unexposed) and one wishes to compare nonnormally distributed outcomes between exposed and unexposed eyes using the Wilcoxon rank sum test while accounting for the clustering. In this article, we present a corrected variance formula for the Wilcoxon rank sum statistic in the setting of eye (subunit)-specific covariates. We apply it to compare ocular itching scores in ocular allergy patients between eyes treated with active versus placebo eye drops, where some patients receive the same eye drop in both eyes, while other patients receive different eye drops in fellow eyes. We also present comparisons between the clustered Wilcoxon test and each of the signed rank tests and mixed model approaches and show dramatic differences in power in favor of the clustered Wilcoxon test for some designs.