This paper is devoted to the computation of distance to set, called S, defined by polynomial equations. First we consider the case of quadratic systems. Then, application of results stated for quadratic systems to the quadratic equivalent of polynomial systems (see [5]), allows us to compute distance to semi-algebraic sets. Problem of computing distance can be viewed as non convex minimization problem: $ d(u,S) = \inf_{x \in S} \| x-u\|^2$, where u is in $\mathcal{R}^{n}$. To have, at least, lower approximation of distance, we consider the dual bound m(u) associated with the dual problem and give sufficient conditions to guarantee m(u) = d(u,S). The second part deal with numerical computation of m(u) using an interior point method in semidefinite programming. Last, various examples, namely from chemistry and robotic, are given.