Perovskite solar cells (PSCs) require both high efficiency and good long-term stability if they are to be commercialized. It is crucial to finely optimize the energy level matching between the perovskites and hole-transporting materials to achieve better performance. Here, we synthesize a fluorene-terminated hole-transporting material with a fine-tuned energy level and a high glass transition temperature to ensure highly efficient and thermally stable PSCs. We use this material to fabricate photovoltaic devices with 23.2% efficiency (under reverse scanning) with a steady-state efficiency of 22.85% for small-area (-0.094 cm(2)) cells and 21.7% efficiency (under reverse scanning) for large-area (-1 cm(2)) cells. We also achieve certified efficiencies of 22.6% (small-area cells, -0.094 cm(2)) and 20.9% (large-area, -1 cm(2)). The resultant device shows better thermal stability than the device with spiro-OMeTAD, maintaining almost 95% of its initial performance for more than 500 h after thermal annealing at 60 degrees C.