I researched the prices of these components at Newegg, Dell, Nvidia, Apple to come up with a ball park number for a maxed out iMac 27" for December 2012.
Base Price: $2000 (Apple)
3.4GHz quad-core Intel Core i7 (3.9GHz Turbo):$350 (Newegg)
32GB (4 x 8gb dimms) 1600MHz DDR3 memory: $300 (Newegg)
GeForce GTX 680MX 2GB GDDR5: $500 (speculation based on the GeForce GTX 680M at Nvidia)
768GB flash storage: $1500 (Dell, who charges $500 per 256GB of flash SSD)
Apple Care: $170 (Apple)
GRAND TOTAL: $4820
Apple will likely charge more on the components bringing it to just under $5000.