How could I calculate this? Should I simply add it to 6371km?
The linked image shows the EGM96 geoid, which is the undulation of the geoid, or the distance between the geoid and the reference ellipsoid, which I believe is the WGS84 ellipsoid. The minimum distance is -110m and the maximum is 90m. If your target accuracy is 1km, the geoid undulation won't affect your result since the minimum and maximum are well below 1km.
On the other hand, the WGS84 is an ellipsoid with an equatorial radius of 6,378,137m and a polar semi-minor axis equals to 6,356,752.3142m.
Therefore, calculating the distance to the center of the earth is going to be more dependant on the location of the point on the globe rather than the geoid undulation at the point location.
So it all boils down to the accuracy you're looking for and what the result is going to be used for.