||We present an algorithm to upper-bound the Hilbert-Schmidt distance between a given state and a separable state closest to it. While the algorithm cannot reach the final answer, it can provide a precise estimate. It can hence be used for classifying states as highly entangled or those so close to a separable state, that their correlations can be hardly useful in practice. The algorithm consists of only basic mathematical subroutines, is very economical in terms computational resources, and can be easily formulated for most physical systems in consideration. We discuss the convergence of the estimate and give a number of numerical examples.