"I knew what I was doing was against the law," Calovskis told a magistrate judge on Friday, according to Sky News.
Čalovskis admitted conspiring to commit computer intrusion at a hearing in Manhattan. He is likely to be sentenced to up to two years in prison when he returns for sentencing in December.
The 30-year-old had faced up to 67 years in jail before entering into a plea-bargain agreement with the US government.
Čalovskis admitted he was hired to write the Gozi virus. It is estimated to have hit more than one million computers worldwide including 40,000 in the US and 190 at NASA.
According to the prosecutor, the losses caused by the virus have reached tens of millions of dollars. Fellow suspects, Russian Nikita Kuzmin and Romanian Mihai Ionut Paunescu, are already in custody in the US.
Kuzmin had also pleaded guilty in 2011 and is cooperating with the investigators.
Čalovskis was arrested in Latvia in 2012, but he was not extradited until February 2015.
His extradition had been held up for several months while he launched an unsuccessful appeal to the European Court of Human Rights, which rejected his claim that he would not be able to face a fair trial in the US.