Electrodialysis (ED) is a desalination technology that has been deployed commercially for decades. However, few studies in the literature have looked at the optimal design and operation of these systems, especially for the concentration of high-salinity brines. In this paper, a set of constraints is defined to allow a fair comparison between different system sizes, designs, and operating conditions. The design and operation of ED are studied for the applications of brackish-water desalination and of high-salinity brine concentration for a fixed system size. The set of variables that determine the power consumption of a fixed-size system is reduced to include only the channel height and the velocity, with all the other design and operation variables depending on these two variables. After studying the minimization of power consumption for a fixed system size, the minimum costs associated with the different system sizes are studied, and the differing trends in brackish-water and high-salinity applications are compared. Finally this paper presents the effect of the cost modeling parameters on the trends of the optimal system size, current density, length, channel height, and velocity for the two applications studied.