The natural period of buildings is a very important parameter for structural dynamic characteristic analysis, which is influenced by many factors. Due to the limitations of the traditional modeling method of curve fitting, the current natural period prediction model only includes single factor such as the height or the number of storeys, while the influence of other factors is ignored. The emergence of data-driven machine learning method provides a new idea to establish a multi-factor prediction model. A total of 2561 building period records of existing buildings are collected from a large number of published documents. A building period database is developed, including the building height, the number of floors, materials, functions, et al. A multi-factor machine learning prediction of building fundamental period with self-learning ability is established, which avoids the tedious parameter adjusting procedure. Comparisons with traditional prediction models show that the proposed prediction model has a wider prediction range of various structural types and higher accuracy. Combined with cloud server, it can form a new, publicly-open and self-learning building period prediction model.