This doesn't EXACTLY answer your question, but I think the study gives a lot of helpful information about the duration of shedding of nonviable virus (and positive test results) with COVID.
https://www.thelancet.com/journals/lanmic/article/PIIS2666-5247(20)30172-5/fulltextFor the TL;dr crowd, viable particles are shed for only 9 days from the upper respiratory tract (and hence contagious potential), while inactive virus particles can be shed for up to 83 days after infection.
MY answer to your question would be 9 days from the onset of symptoms with a confirmatory positive test OR 9 days after a positive test in an asymptomatic patient.
As is stated in responses above, places of work and those regulating travel are still stuck in thinking a negative test is necessary to prove a person is no longer contagious.
No material on this site is intended to be a substitute for professional medical advice, diagnosis or treatment. See full
Medical Disclaimer.