We consider the inverse optimization problem associated with the polynomial program f^*=\min \{f(x): x\in K\}andagivencurrentfeasiblesolutiony\in K.Weprovideasystematicnumericalschemetocomputeaninverseoptimalsolution.Thatis,wecomputeapolynomial\tilde{f}(whichmaybeofsamedegreeasfifdesired)withthefollowingproperties:(a)yisaglobalminimizerof\tilde{f}onKwithaPutinar′scertificatewithanaprioridegreebounddfixed,and(b),\tilde{f}minimizes\Vert f-\tilde{f}\Vert(whichcanbethe\ell_1,\ell_2or\ell_\infty−normofthecoefficients)overallpolynomialswithsuchproperties.Computing\tilde{f}_dreducestosolvingasemidefiniteprogramwhoseoptimalvaluealsoprovidesaboundonhowfarisf(\y)fromtheunknownoptimalvaluef^*.Thesizeofthesemidefiniteprogramcanbeadaptedtothecomputationalcapabilitiesavailable.Moreover,ifoneusesthe\ell_1−norm,then\tilde{f}$ takes a simple and explicit canonical form. Some variations are also discussed.