The decrease of density contrast with depth in many sedimentary basins can be approximated by a quadratic function. The interpretation of gravity anomalies over sedimentary strata can be more realistic if variable density contrasts, rather than constant density contrasts, are assumed. I derive the equation for the gravity anomaly of an asymmetrical trapezoidal model, assuming a quadratic density function, and I develop methods of interpretation, using the Marquardt algorithm. While interpreting a synthetic anomaly profile, the convergence of the algorithm is shown by plotting the values of the objective function, damping parameter, and various parameters of the model with respect to iteration number; the results are superior to those obtained when using constant density contrasts. In addition, I apply the method in the interpretation of gravity anomalies over the San Jacinto graben and the lower Godavari basin.