The trio - who are all from Afghanistan - raped a 21-year-old student in a public toilet in Vienna's Praterstern station last year.
The maximum sentence the judge could have given the teenagers, who were all under-18 at the time of the attack, was seven and a half years.
The Turkish student had been out with a friend when she stopped at the station to use the public toilet but was followed into the cubicle by the three teenagers. The youngest boy held her down whilst the two older boys raped her.
State prosecutor Katharina Stauber said that the crime was premeditated, with the trio waiting at the station for a victim, and that they had behaved in a particularly brutal manner towards her and should be punished accordingly.
The young woman has since returned to Turkey and still suffers psychological trauma. Stauber said that she can't even talk about what happened to her as it is considered ‘shameful' in her home country.
The teenagers remained expressionless during their sentencing. The two younger boys apologised to the victim, with the 16-year-old saying that he didn't know how he could make up for what he had done.