The relative roles of parameters governing relative permeability, a crucial property for two-phase fluid flows, are incompletely known. To characterize the influence of viscosity ratio (M) and capillary number (Ca), we calculated relative permeabilities of nonwetting fluids (knw) and wetting fluids (kw) in a 3D model of Berea sandstone under steady-state condition using the lattice Boltzmann method. We show that knw increases and kw decreases as M increases due to the lubricating effect, locally occurred pore-filling behavior, and instability at fluid interfaces. We also show that knw decreases markedly at low Ca (log Ca < −1.25), whereas kw undergoes negligible change with changing Ca. An M–Ca–knw correlation diagram, displaying the simultaneous effects of M and Ca, shows that they cause knw to vary by an order of magnitude. The color map produced is useful to provide accurate estimates of knw in reservoir-scale simulations and to help identify the optimum properties of the immiscible fluids to be used in a geologic reservoir.