Building height is a critical variable in urban studies, and the automated acquisition of the precise building height is essential for intelligent construction, safety, and the sustainable development of cities. The building height is often approximated by the building’s highest point. However, the calculation method of the building height of the various roof types differs according to building codes, making it challenging to accurately calculate the height of buildings with complex roof structures or multiple upper appendages. Consequently, this paper utilizes point clouds to propose an automated method for calculating building heights conforming to design codes. The model considers roof types and allows for fast, automated, and highly accurate building height estimation. First, roofs are extracted from the point cloud by combining normal vector density clustering with a region-growing algorithm. Second, combined with variational Bayes, a Gaussian mixture model is employed to segment the roof surfaces. Finally, roofs are classified based on slope characteristics, achieving the automatic acquisition of building heights for various roof types over large areas. Experiments were conducted on Vaihingen and STPLS3D datasets. In the Vaihingen area, the maximum error, root-mean-square-error (RMSE), and mean absolute error (MAE) of the measured heights are 1.92 cm, 1.18 cm, and 1.13 cm, respectively. In the STPLS3D area, these values are 1.79 cm, 0.82 cm, and 0.68 cm, respectively. The results demonstrate that the proposed method is reliable and effective, which offers valuable data for the development, construction, and planning of three-dimensional (3D) cities.