Spellcasting doesn’t cost mana, but you may choose to spend it to enhance many of your spells. In many cases, enhanced spells will temporarily lower your maximum mana, as well as your current, but only for the duration of the spell.
Your mana is calculated as follows:
1) Mettle + Tenacity + Discipline + 3 times Aura. 2) Add any Mana bonuses from class powers. 3) Apply the +25% bonus for the Magically Gifted talent, if you have it. 4) Add any Mana bonuses from magical items. 5) Apply your Focus skill as a percentage. 6) Apply any Mana modifiers from spells.
Note that if you have any bonuses to primary stats (from either spells or magic items) then these are calculated prior to step 1.
See also: replenishment