since 3.5 / PF spells per day is dependent not only on your level, but also your class and attributes(for bonus spells) I don't think you're going to get that through a macro calculation. Sometimes macro automation just isn't the way to go. That being said, I've seen folks come up with ridiculously complex mathematics to get the job done. (*cough* Gauss *cough*) so don't lose all hope yet :) If you want a macro that displays your spells/day I would then recommend you store that values as Attribute values and have the macro reference it. What I do, myself, is just type it out on my character sheet's Bio tab and adjust it as I go.