On a molality basis, \[I_{m}=\frac{1}{2}\ \sum m_{\text{B}}\ z_{\text{B}}^{2}\] where the sum goes over all the ions B. z B is the charge number of ion B. The ionic strength on a concentration basis is defined analogously \[I_{c}=\frac{1}{2}\ \sum c_{\text{B}}\ z_{\text{B}}^{2}\]
Sources:
Green Book, 2nd ed., p. 50 (https://goldbook.iupac.org/files/pdf/green_book_2ed.pdf)
PAC, 1996, 68, 957. 'Glossary of terms in quantities and units in Clinical Chemistry (IUPAC-IFCC Recommendations 1996)' on page 977 (https://doi.org/10.1351/pac199668040957)