To improve the inconsistency in the analytic hierarchy process (AHP), a new method based on marginal optimization theory is proposed. During the improving process, we regard the reduction of consistency ratio (CR) as benefit, and the maximum modifica