We develop a framework for choosing the optimal load resistance, feed velocity, and residence time for a reverse electrodialysis stack based on minimizing the levelized cost of electricity. The optimal load resistance maximizes the gross stack power density and results from a trade-off between stack voltage and stack current. The primary trade-off governing the optimal feed velocity is between stack pumping power losses which reduce the net power density and concentration polarization losses which reduce the gross stack power density. Lastly, the primary trade-off governing the optimal residence time is between the capital costs of the stack and pretreatment system. Implementing our strategy, we show that a smaller load resistance and feed velocity as well as a larger residence time than what is currently proposed in the literature reduces costs by over 40%. Despite these reductions, reverse electrodialysis remains more costly than other renewable technologies.