Officials said one student is from De La Salle High School and the other is from Ygnacio Valley High School.
The incident occurred in late September off-campus in unincorporated Walnut Creek.
Officials said the female student reported the incident to school counselors and they contacted police.
Both suspects have been booked at juvenile hall in Martinez.
Mount Diablo Unified School District officials released a statement saying, "The Contra Costa County Sheriff's Department is investigating an alleged assault incident involving a district high school student. The allegations are very serious, and Mt. Diablo Unified is working with the Sheriff's Department to assure a thorough and timely investigation. It is important that due process is followed, and the privacy rights of all involved are protected in order to assure the integrity of the investigation. As such, we will not be able to comment in greater detail at this time."
De La Salle on alleged sex assault: "let us make ourselves clear: at De La Salle High School, we expect and demand respect for all persons." pic.twitter.com/I0mBcNhqwm— Elissa Harrington (@ElissaABC7) October 19, 2017
Carondelet statement: "We are proud of the courage our student has shown in coming forward and we will continue to support her." #abc7now— Elissa Harrington (@ElissaABC7) October 19, 2017
1/2 Student at Ygnacio Valley high school in #Concord arrested for alleged assault. School District: "The allegations are very serious..."— Elissa Harrington (@ElissaABC7) October 19, 2017
Contra Costa County Sheriff's Dept. investigating alleged assault involving high school students. #abc7now— Elissa Harrington (@ElissaABC7) October 19, 2017