The two-body problem is to predict the motion of two massive objects which are abstractly viewed as point particles that the two objects interact only with one another. In general two planets orbit around the center of mass of the system.
In astronomy, the barycenter is the center of mass of two or more bodies that orbit one another and is the point about which the bodies orbit. If one of the two orbiting bodies is much more massive than the other and the bodies are relatively close to one another, the barycenter will typically be located within the more massive object. In this case, rather than the two bodies appearing to orbit a point between them, the less massive body will appear to orbit about the more massive body, while the more massive body might be observed to wobble slightly. This is the case for the Earth-Moon system, in which the barycenter is located on average 4,671 km (2,902 mi) from Earth's center, 75% of Earth's radius of 6,378 km (3,963 mi).
To calculate the actual motion of the Sun, only the motions of the four giant planets (Jupiter, Saturn, Uranus, Neptune) need to be considered. The contributions of all other planets, dwarf planets, etc. are negligible. If the four giant planets were on a straight line on the same side of the Sun, the combined center of mass would lie about 1.17 solar radii or just over 810,000 km above the Sun's surface which is in approximate case negligible.
Reference :
Barycenter
Two body problem
Path of Earth and Moon around sun
Double Planet