Final answer:
Newton took approximately 20 years to develop his law of universal gravitation, from initial thoughts to publishing his work in 1687.
Step-by-step explanation:
It took Newton approximately 20 years to develop the law of universal gravitation. His inquiry into the force of gravity began around 1665, but it was not until 1687 that he published his seminal work, Philosophiæ Naturalis Principia Mathematica, which included his law of universal gravitation. The development of this law was influenced by the observation of falling objects, such as apples, and the movements of celestial bodies, leading Newton to the realization that the same force governed both phenomena. Newton's articulation of the gravitational force and the accompanying mathematical principles were revolutionary and provided a framework for understanding a fundamental force of nature that could explain both terrestrial motions and the orbits of astronomical objects.