Clockwork construct prices

I'm at a level were I can start crafting constructs given enough time. I would like to start crafting clockwork constructs but in order to do that I need to understand the pricing of them first. The given rule is CR squared times 500 gp. While this holds true for most of the clockwork types in the Bestiarys it doesn't hold true for other basic constructs. One example would be the clay golem. Its a CR 10 so with the given formula it would work out to be 50,000 gp to make but its price is 21,500 gp. The other standard golems are closer to there formula price but still few fit it. Then moving onto the clockwork creations they stick closer to the formula like the Clockwork Soldier but what has me confused with that is that clockworks have the Difficult to create (ex). Which increases both time and cost of construction by 150%. So if anyone can help me understand the the math behind here actual creation I would be much appreciated.