This is about 7 million more people than were counted at the previous census, in 2001.
The document shows there were 51 770 560 people in the country at midnight on October 9 last year, the date of the 2011 Census, compared to 44 819 778 counted a decade earlier.
It also shows there are more women than men. Of the 51.8 million, about 25.2 million are male, and 26.6 million are female.
The census results show that Gauteng, the smallest-sized of South Africa's nine provinces, is the most populous, with 12.3 million people.
By contrast, the country's largest province, the Northern Cape, has the least number, with 1.1 million people.
KwaZulu-Natal, the second-most populous province, has 10.3 million.
The Eastern Cape population appears not to have grown at the same rate as other regions over the past 15 years. In 1996, the population was 6.1 million; in 2001, 6.3 million; and, in 2011, 6.6 million.
The population of neighbouring Western Cape has grown far more rapidly, from about 4 million in 1996, to 4.5 million in 2001, to 5.8 million in 2011.