How to calculate gold earned from a Wonder if another civilization finishes first?

In Civilization V I noticed that when you are about to finish producing a Wonder and another civilization finishes it first, you will earn gold equivalent to how much production you have produced for that Wonder.

For example, I'm constructing the Statue of Liberty (total prod of 1060 prod points) and I've finished 1000 production then another civilization completes it first. How much gold will I earn?

Is there a formula for calculating money earned from unfinished wonders?


Just tested this in a hot-seat game. Wonder fail-gold is 1 for 1. That is, you get 1 gold for every hammer input. This is a better return than the 1 gold for 4 hammers you get by building wealth.

Additionally, I checked the source code (Steam -> Tools -> Sid Meier's Civilization V SDK)
For Brave New World, in

...\steamapps\common\Sid Meier's Civilization V SDK\CvGameCoreSource\CvGameCoreDLL_Expansion2\CvCity.cpp

The relevant code block starts at line 12739 (function CvCity::doCheckProduction)

...
iProductionGold = ((iBuildingProduction * iMaxedBuildingGoldPercent) / 100);
...
thisPlayer.GetTreasury()->ChangeGold(iProductionGold);

iMaxedBuildingGoldPercent is 100, sourced from GlobalDefines.xml, for BNW found at

...\steamapps\common\sid meier's civilization v\assets\DLC\Expansion2\Gameplay\XML\GlobalDefines.xml