In Illinois, the age of consent to engage in sex is 17 years old. This applies to both heterosexual and homosexual acts.
It should be noted that in Illinois, if both parties are below the age of consent, it is illegal for them to have sex, even if they are the same age. So, in Illinois, if a 16-year-old couple has sex, they are both committing a crime, and each partner is simultaneously a victim and an offender.
While it is always illegal for partners under the age of consent to have sex, if they are close to the same age, the crime is mitigated. For example, if the parties are between the age of 13 and 17, and within 5 years of each other, the punishment for them having sex would be, at most, 1 year in prison.
However, if one of the parties in Illinois is more than 5 years older than the minor, the penalty is 3 to 7 years in prison.