Compact finite-difference formulations on nonuniform grids are developed by matching Taylor series of various orders. The accuracies of those formulations are analyzed by the Fourier error method. A new compact finite-difference formulation based on the projection method is established on the staggered grid, and it is used to calculate two typical natural-convection problems. The results indicate that the new compact finite-difference method has higher-order accuracy than traditional methods. For Rayleigh-Benard convection with an aspect ratio of 8, it can predict three different types of static bifurcation at Ra ¼ 5,000 with different initial conditions.