People who are infected with HIV in the United States often go for years without being diagnosed, with the median, or midpoint, being three years, according to US government data Tuesday.
That's a slight improvement over the previous report in 2011, which found the median time from HIV infection to diagnosis was three years and seven months, said the US Centers for Disease Control and Prevention.
But experts say people at risk of infection need to get tested more often, since about 40 percent of new HIV infections originate from people who don't know they have HIV.
"If you are at risk for HIV, don't guess—get a test," said Jonathan Mermin, director of the CDC's National Center for HIV/AIDS, Viral Hepatitis, STD, and TB Prevention.
"The benefits are clear. Prompt diagnosis is prevention."
The CDC recommends all people aged 13-64 get tested for HIV at least once in their lifetime.
People at higher risk of infection, including sexually active gay and bisexual men, should get tested at least annually, if not every three to six months.
The CDC Vital Signs report, based on data from 2015, found that 29 percent of gay and bisexual men said they did not get a test for HIV in the past year.
Nor did 42 percent of people who inject drugs, or 59 percent of heterosexuals at increased risk for HIV.
For gay and bisexual males, the estimated timing from HIV infection to diagnosis was a median of three years—meaning half were diagnosed in less than three years and half were diagnosed after more than three years.
"A quarter of people diagnosed with HIV in 2015 lived with HIV for seven or more years without knowing it," said the report.
For heterosexual males, the median time from infection to diagnosis was five years. For heterosexual females and females who inject drugs it was 2.5 years.
Overall, 85 percent of the estimated 1.1 million people living with HIV in 2014 knew their HIV status, said the report.
"Ideally, HIV is diagnosed within months of infection, rather than years later," said Eugene McCray, director of CDC's Division of HIV/AIDS Prevention.
"Further increasing regular HIV testing and closing testing, diagnoses and treatment gaps is essential to stopping HIV in our communities."
Explore further: Worse HIV care outcomes for Hispanics, Latinos