*Hypotheses:* To correctly predict the aggregation number and size of wormlike micelles from ionic surfactants, the molecular-thermodynamic theory has to calculate the free energy per molecule in the micelle with accuracy better than 0.01 kT, which is a serious challenge. The problem could be solved if the effects of mutual confinement of micelle counterion atmospheres, as well as the effects of counterion binding, surface curvature and ionic interactions in the electric double layer (EDL), are accurately described.

*Theory:* The electric field is calculated using an appropriate cell model, which takes into account the aforementioned effects. Expressions for the activity coefficients have been used, which vary across the EDL and describe the electrostatic, hard sphere, and specific interactions between the ions. New approach for fast numerical calculation of the electrostatic free energy is developed.

*Findings:* The numerical results demonstrate the variation of quantities characterizing the EDL of cylindrical and spherical micelles with the rise of electrolyte concentration. The effect of activity coefficients leads to higher values of the free energy per surfactant molecule in the micelle as compared with the case of neglected ionic interactions. The results are essential for the correct prediction of the size of wormlike micelles from ionic surfactants. This study can be extended to mixed micelles of ionic and nonionic surfactants for interpretation of the observed synergistic effects.