If you notice the little numbers on the button icons, that tells you how much MP the spell will use. That number will turn red if the target is out of range.