Can a 17-Year-Old Consent to a 23-Year-Old in Texas?
Age gaps, messages and related statutes can all change how a case is viewed. Here is how to start protecting your position.
By Heather Barbieri · Published November 12, 2026
Short Answer: Can a 17-Year-Old Consent to Sex With a 23-Year-Old in Texas?
Texas generally sets the age of consent at 17, so a 17-year-old’s agreement is not treated like a child’s under the sexual assault law. The Texas State Law Library notes that the age lines differ from one offense to another, so one number does not settle every question.
Under Penal Code § 22.011, an offense under subsection (a)(1) requires that the penetration or contact occur without the other person’s consent, while subsection (a)(2) applies to a child, defined in subsection (c)(1) as a person younger than 17 years of age, and contains no consent element, regardless of whether the person knows the child’s age at the time of the offense. That is the first issue. The second issue is the age of the other person, and a six-year gap raises questions under other statutes too.
Consent is not the whole picture. Texas law also looks at the age gap, messages, the setting, and whether one person was a student. This page gives general legal information. It does not predict how any specific situation would be charged. For the wider picture, read our guide to child sex crime charges in Texas.
If a relationship, a message, or a call from a parent, school, or police has put you in this position, we can talk it through with you in a free, confidential first consultation. Talk it through with our team — the first consultation is free, confidential, and carries no obligation.

Why Is the Legal Age of Consent 17 in Texas?
The age line is 17 because the Penal Code defines a child, for sexual assault purposes, as a person younger than 17.
Under the same section, a sexual act with a child is an offense whether or not the actor knows the child’s age. Consent is not an element of that child-specific subsection. A 17-year-old falls outside the under-17 line.
Penal Code § 21.11, indecency with a child, uses the same under-17 line. Its listed elements do not include consent. For indecency with a child, Penal Code § 21.11 defines sexual contact, when done with intent to arouse or gratify sexual desire, as any touching by a person, including through clothing, of a child’s anus, breast, or genitals, or any touching of a child’s body with a person’s anus, breast, or genitals.
The 17 line matters most in practice. It separates a teen who is old enough to consent from a child the law protects regardless of agreement.
Is a 17-Year-Old Still a Minor in Texas?
Age of consent and minor status are two different questions. Texas offenses do not all use the same age.
Penal Code § 43.25 defines sexual performance by a child using a child younger than 18. Some Texas offenses protect people under 18, not under 17.
Online solicitation of a minor works differently. Penal Code § 33.021 defines a minor as someone younger than 17, or someone the actor believes is younger than 17. A 17-year-old is outside that definition, but the actor’s belief about age can still matter.
A parent, school, or police officer may still treat a relationship with a teenager as a serious matter. That reaction can start before anyone decides which statute, if any, applies.
Does the Romeo and Juliet Law Apply to a 17-Year-Old and a 23-Year-Old?
The close-in-age affirmative defense in Texas Penal Code § 22.011 is limited to a prosecution under Subsection (a)(2), which covers conduct involving a child, defined as a person younger than 17, and does not reach a prosecution under Subsection (a)(1). Within that scope, it applies only if the actor was no more than three years older than the victim; the victim was a child of at least 14 who was not a person the actor was prohibited from marrying or living with as if married under Section 25.01, or from having sexual intercourse with under Section 25.02; and the actor, at the time of the offense, was not required under Chapter 62, Code of Criminal Procedure, to register for life as a sex offender or did not have a reportable conviction or adjudication under that chapter for an offense under this section. Under Texas Penal Code § 22.011, the close-in-age affirmative defense requires that the actor was not more than three years older than the victim.
The Penal Code § 22.011 defense requires that the actor was not more than three years older than the victim. It also has other conditions, so close ages alone do not decide any case.
Similar three-year age-difference conditions appear in affirmative defenses to indecency with a child and online solicitation of a minor. The sexual performance defense in Penal Code § 43.25 uses a two-year limit.
A different rule, Code of Criminal Procedure art. 42.017, uses a four-year figure. It requires a judge’s finding in certain judgments, and it is not a defense.
Other Texas Laws That Can Apply Even If Consent Is Present
Yes, several Texas laws can apply even when both people agreed. Consent is one question. Other questions include intoxication, the ages involved, and the kind of material or contact at issue.
Intoxication matters. Intoxication matters. Penal Code § 22.011 treats a sexual assault under Subsection (a)(1) as without the consent of the other person when the actor knows the other person is intoxicated or impaired by any substance to the extent that the other person is incapable of consenting.
Images also carry risk. Texas law also addresses possession of, or access with intent to view, visual material that contains a depiction of a child engaging in sexual conduct.
School employees face their own statute. Penal Code § 21.12 applies to an employee of a public or private primary or secondary school who engages in sexual contact, sexual intercourse, or deviate sexual intercourse with a person enrolled at the school where the employee works, and in some cases with students at other schools or school-sponsored activities. Read our guide on school employee and coach charges.
Charges in these cases often turn on the ages, the messages, the setting, and the evidence, and each situation depends on the facts.
How Age of Consent Works Outside Texas
A relationship that is treated one way somewhere else does not answer the question for Texas.
The offenses discussed here are Texas statutes. The questions turn on Texas law, the ages involved, and the conduct at issue.
Rules differ, and the details matter. Texas law sets its own age lines, defenses, and degrees of offense, so a comparison to another place can mislead.
Not sure what your next step is?
Talk it through with our team — the first consultation is free, confidential, and carries no obligation.
What Happens When Police, Schools, or Parents Get Involved
A case can begin with a school report, a parent’s complaint, a review of messages or a phone, or a police contact. Each starting point can lead to a different set of questions.
Your loved one may be asked to talk, hand over a phone, or share messages. Before your loved one answers questions or gives up a device, talk with a lawyer about the options.
If charges are filed, bond conditions may affect contact with the other person. Our guide to child sex crime bond conditions in Texas explains that topic in more detail.

Talk Through Your Situation With Barbieri Law Firm
If a relationship, a message, or a call from a parent, school, or officer has brought your loved one’s situation to you, you did not choose this position. You may have many questions and very little time to think them through.
Call (972) 424-1902 or send your case details through our contact page. Your first consultation is free, confidential, and carries no obligation to continue. No lawyer can promise how a case will turn out, but we will review the ages, the timeline, and the contact that prompted your question.
Quick Questions
Can a 17 year old consent to an older partner in Texas?
Texas Penal Code § 22.011 defines a child as a person younger than 17 years of age. The age gap, the messages, and other statutes can still matter.
Is an age gap a defense in Texas?
Under Texas Penal Code § 22.011(e), the close-in-age affirmative defense applies only to a prosecution under Subsection (a)(2), which involves a child younger than 17, not to prosecutions under other subsections. It is available only when the actor was at most three years older than the victim, the victim was a child aged 14 or above who did not fall within the additional categories the statute excludes, and the actor, at the time of the offense, either was not required under Chapter 62, Code of Criminal Procedure, to register for life as a sex offender or had no reportable conviction or adjudication under that chapter for an offense under this section.
Is a 17-year-old a minor in Texas?
Some Texas offenses protect people under 18, while others use 17. The age that applies depends on the offense.
Attorney responsible for this site: Heather Barbieri, Barbieri Law Firm, Frisco, Texas.
Before you talk to anyone
Do not delete messages, photos or social media posts, and do not discuss the matter with the other person or with police until you have spoken with a lawyer.
How Barbieri Law Firm approaches these cases
Focused criminal defense
Our team focuses on sex crimes, child sex crimes, online sex crimes and other assaultive offenses in Collin County, Dallas-Fort Worth and across Texas.
A review of the full record
We review the ages, dates, messages and statements in your situation and explain the options that may apply to your case.
Board certification in Criminal Law
Heather Jean Barbieri, Board Certified, Criminal Law — Texas Board of Legal Specialization
Confidential and respectful
Speaking with us is private. Your first consultation is free, confidential and carries no obligation to continue.
What to gather for your first consultation
Ages and dates
Write down each person's date of birth and the dates when contact began and ended.
Messages and images
Keep the original messages, photos and social media records. Do not edit or forward them.
Where and how contact happened
Note the location, the platforms used and who else knew about the relationship.
Any contact with police or school officials
Tell us what was said, by whom and when. Bring any notices or paperwork you received.
Talk with Barbieri Law Firm about your situation. Your first consultation is free, confidential and carries no obligation.
Request a Consultation
Fill out the short form and we will take it from there.

