Increasing energy efficiency requirements lead to lower energy consumption in buildings, but at the same time occupants’ influence on the energy balance of the building during the use phase becomes more crucial. The randomness of the building’s occupancy often leads to the mismatch of the predicted and measured energy demand, also called Energy Performance Gap. Therefore, prediction of occupancy is important both in the design and use phases of the building. The goal of the study is to apply Extreme Learning Machine (ELM) models with different optimisation algorithms – Genetic (GA-ELM) and Simulated Annealing (SA–ELM) for occupancy prediction in an office building based on measured CO2 concentrations. Both models show similar and high accuracy of prediction: R2 – 0.73–0.74 and RMSE – 1.8–1.9 for the whole measured period. Influence of population size, number of neurons, and number of iterations on results accuracy was also analysed and recommendations are given. It was concluded that both methods are suitable for occupancy prediction, but because of different simulation times, SA-ELM is recommended for the Building Management Systems (BMS), where higher speed is required.