There is little figuring involved. Here's how it works.
If you do not have your old battery with you when you buy the new one, the store will add the Core Charge to the total of the battery then add tax to that total and that is what you pay. When you bring the old battery back (any old battery will do), the store will refund the Core Charge AND the tax on the Core Charge. If you don't give them an old battery, they keep the Core Charge and the extra tax.
So before you can figure the actual cost, you'll need to ask the store you are buying the battery from to tell you how much their Core Charge is. It can vary from place to place. It is easiest to just bring the old battery in when you buy the new one, then there will be no Core Charge and no trips back to the store for a refund.
Remember, in the case of a car battery, any old car battery will do, it doesn't need to be the battery you are replacing, because these are recycled for the materials. The policy is different for Chore Charges on most other auto parts like Starters and Alternators etc. These items actually get re-built using most of the old parts, so they need to be the same as the item you are replacing.
The core charge on anew battery is usual set by the amount of the cost of this new battery. Lets say about 20% is core charge, Keep your receipt so when this battery is brought back for any reason the core charge will go towards anew battery as well.