According to the 2020 Chinese census, Shanghai's population was 24,870,895, making it the most populous city in mainland China after Chongqing.