I know the number of gems required to instantly finish building/upgrading is determined on time. I was wondering if there was a formula for working out how many gems are required to instantly finish building an upgrade without having to click on the building itself (so by just looking at the timer that's above it) or before I go to build/upgrade.
The formula is quite complicated. The cost in gems per second decreases the greater the time you wish to rush. I.e. the cost of rushing 1 minute is significantly more per second than the cost of rushing 1 week.
It appears that different formulas apply to different time sectors. These sectors being
- 1 sec > 1 minute : 0 - 60 seconds
- 1 minute > 1 hour : 60 - 3,600 seconds
- 1 hour > 1 Day : 3,600 - 86,400 seconds
- 1 Day > 1 week : 86,400 - 604,800 seconds
Therefore the cost can not be represented by a gradual curve.
The five different formulas used to calculate the costs involved in each segment are as follows, from 1 second down to 1 week and where x = the number of seconds you wish to rush.
Not exactly the simplest of equations and trying to work out the cost in your head just by looking at the time (if greater than 1 minute) would be extremely difficult... However the formula can be entered into an excel spread sheet and this is a link to a Live Demo of such a spread sheet. There's also a handy calculator on the Clash of Clans Wiki. I hope these are of some use.
All my info was taken from this website. So Thanks to Wolfgang for his insights.