The Earth's magnetic field provides an important protection against the solar wind (for example, see Wikipedia on Earth's magnetic field and references therein). Mars may have lost its atmosphere because it did not retain such a magnetic field, although Venus does not have an intrinsic magnetic field either. This raises the question: what will happen to Earth's atmosphere if the global magnetic field would disappear? Would the solar wind blow it all away? If so, how long would it take until only a small part (<10 kPa sea level pressure) is left?
Atmospheric escape is a topic with a long research history. It is complex and is being addressed with both measurements and simulations.
For example, the question of atmospheric escape is still actively researched at Mars, and the MAVEN (Mars Atmosphere and Volatile Evolution) spacecraft mission is for example dedicated to this topic. Mars is a planet without a significant global magnetic field (although it does possess crustal magnetic anomalies); in fact its planetary dynamo was active and then stopped about 3.6 billion years ago, which considerably reduced the strength of its magnetic field.
So understanding the evolution of its atmosphere helps to relate to what would happen if Earth would loose its magnetic field. The question of atmospheric escape at Mars is relevant concerning the fate of water (geological evidences indicate the presence of liquid water in the past, which suggests a warm and dense atmosphere able to support it at that time).
Besides thermal atmospheric escape, there is also non thermal escape, including removal by asteroid impact (in the past) and by interaction between the atmosphere and the solar wind leading to pickup of atmospheric ions (in the past and continuing today).
Some examples of references to the scientific literature about atmospheric escape at terrestrial planets (abstracts):
Outgassing History and Escape of the Martian Atmosphere and Water Inventory
Nonthermal escape of the atmospheres of Venus, Earth, and Mars
Since atmospheric retention is largely dependent on escape velocity and temperature, removal of the Earth's magnetic field should not have a greatly noticeable effect, as current research shows that Earth's magnetic field changes the location of atmosphere loss due to the solar wind rather than eliminating it. Earth's temperature is not likely to change much without a magnetic field (with the current solar luminosity), so that too can be discounted.
It is far more likely that Earth's atmosphere will diminish as a result of increasing temperature as the sun expands due to an increase in helium fusion as it runs out of hydrogen, a phenomenon that would not be dependent on having or not having a magnetic field. That would be in roughly 5 to 7 billion years according to the Atmospheric Escape and the Formation and evolution of the Solar System Wikipedia articles.
If we discount solar expansion and make the convenient but incorrect assumption that solar wind and temperature will remain constant over time, then it is possible that Earth's atmosphere could be stripped in a timeframe on the order of many trillions of years. See the Atmospheric Escape Wikipedia article, and this How Vital Is a Planet's Magnetic Field Space.com article.