If you want to calculate the total for each post, then calculating it using PHP code would be more efficient. But, if you want to calculate the total from all posts (e.g. the sum of the totals) and show it in a specific post/page, then saving it to the database would be better.
I hope this helps 🙂
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users