I was not calculating the cost to upgrade items that were missing prerequisites. For example, at Town Hall 7, I was not adding in the cost to upgrade Golems to Level 2 until you had upgraded your Dark Barracks to Level 4. This is now fixed so these resource and time costs are added in to the totals required to max out your town hall.
I haven’t started working on the Profile page, but is there any appetite for setting goals for what you want to achieve before upgrading the town hall? I know some people don’t like maxing out their mines and collectors, for example, so such a feature would allow you to specify that you only want mines and collectors to go to Level 6, for example, and the calculations for total resources and times would be adjusted accordingly.