The men were accused of attending or arranging “deviant” sex parties, and dressing in women’s clothes and wearing make-up.
Egyptian law does not explicitly ban homosexual acts, but prosecutors have used legislation banning debauchery to try homosexuals.
The verdict has been condemned by human rights campaigners.
One of the men was jailed for three years with hard labour by the court in Cairo.
US-based Human Rights First group said it was “alarmed and disappointed” at the verdicts.
“Egypt is a bellwether state in the Arab region; what happens in Egypt sets a trend for developments throughout the Arab world,” it said in a statement.
The group said that since the ousting of President Mohammed Morsi in July 2013 there has been a rise in the number of arrests of people based on their sexual orientation.
The latest case echoes that of the mass trial in 2001 of 52 men accused of homosexual acts and other offences under Egyptian law.
Twenty-three of the men were sentenced to up to five years in jail with hard labour, drawing international condemnation.
A leading Egyptian human rights group said the severe sentences the men received on Monday were part of an ongoing crackdown on personal freedoms.
The convictions come a day after another court in the capital upheld three-year prison terms imposed on three prominent activists convicted of organising an unauthorised protest.