The study, published in Nature Medicine, used an app called COVID Symptom Tracker.
The app asked users to document their symptoms daily.
Out of the 2 million participants, more than 15,000 people reported having had a test for coronavirus, with nearly 6,500 testing positive.
The results were compared to 168,000 US-based users of the app, 2,736 of whom had been tested for COVID-19, with 726 testing positive.
Interestingly, two thirds of users testing positive for coronavirus infection reporting losing the sense of taste and smell compared with just over a fifth of the participants who tested negative.
Finally, researchers used the data to create a mathematical model that can predict with nearly 80% accuracy whether an individual is likely to have COVID-19 based on their age, sex and a combination of four key symptoms: loss of smell or taste, severe or persistent cough, fatigue and skipping meals.