This paper presents a joint subcarrier and power allocation algorithm for multiuser orthogonal frequency division multiplexing (MU-OFDM) cognitive radio (CR) systems, where the peak power constraint is used to protect the primary user. We first derive a rule for subcarrier allocation to maximize the sum capacity for a given power distribution. With this rule, we form a joint subcarrier and power allocation algorithm in which the sum capacity optimization can be alternated between the subcarrier and power. To simplify the high-complexity optimal power allocation algorithm (i.e., the iterative partitioned water-filling algorithm) for the joint scheme, we develop a simple method for updating the water level when each subcarrier is allocated to a secondary user. Simulation results show that using the proposed low-complexity method to update the water level achieves a system capacity close to that of the joint subcarrier and power allocation algorithm with optimal power distribution.