A semi-analytical method for the buckling and postbuckling analysis of composite-stiffened panels is presented. The method is formulated in the context of a variational framework and is based on the method of Ritz. Two levels of approximation are introduced, consisting of a plate assembly representation for the buckling analysis and an elastically restrained panel for the postbuckling assessment. Two aeronautical panels with open-section and closed-section stringer profiles are analyzed, illustrating the comparison with finite element predictions and with experimental data taken from the literature. The results indicate that accurate predictions can be obtained in terms of buckling loads, postbuckling reduction in stiffness, and out-of-plane deflections with an analysis time of the order of a few seconds.