Subcarrier-and-bit allocation (SBA) has been extensively investigated in the literature to improve spectral efficiency of multiuser orthogonal frequency division multiplex (OFDM)systems. However, in previous studies, only suboptimal solutions were given and only single-class case was considered. In this paper, a unified analysis of adaptive SBA for multiclass multiuser OFDM system is presented. The constrained power optimization is formulated as a mixed integer nonlinear programming (MINLP) problem. The optimal solution to this problem is derived, i.e., the instantaneous total transmit power is minimized with the quality-of-service (QoS) (data rate and bit error rate) of each class guaranteed. The optimized system performance is compared with both the fixed sub-carrier and bit allocation scheme and the rate-adaptive scheme without multiuser diversity. The framework presented in this paper, based on the optimal solution, can be used as a benchmark for future developed heuristic algorithm.