Electron-budget tool

Valence Electron Calculator

Enter a simple main-group formula or ion. The calculator adds each element contribution and adjusts the total for charge.

The parser covers straightforward main-group formulas without parentheses. Transition-metal electron counting requires a different model.

How the calculation works

  1. Find the valence electrons for each element.

    Use periodic-table group patterns for main-group elements.

  2. Multiply by the atom count.

    For CO2, carbon contributes 4 and two oxygens contribute 12.

  3. Adjust for charge.

    Add electrons for anions and subtract for cations.