We solve the problem of a social planner who seeks to minimize inequality via transfers with a fixed public budget in a distribution of exogenously given incomes. The appropriate solution method depends on the objective function: If it is convex, as in the case of the absolute mean deviation, it can be solved by an interior-point algorithm. If it is quasiconvex, as in case of the Gini coefficient, the bisection method can be used. We implement the procedures using artificial and real-world data, and show that the optimal transfer scheme need not comply with a transfer scheme that perfectly equalizes incomes at the bottom of the distribution.