Can I stay on campus even if I’m not taking classes?

During the summer, sure. Lots of students do. Consult the Summer Housing Site from Student Housing for eligibility, timing, price, and so forth.

But during the school year, it is generally not possible to live on campus unless you are an active student. There are two exceptions, both only for students who are very close to graduation.

 
1. Seniors who graduate early (have the degree conferred) can petition Housing for a Post-Graduation Quarter in Housing. Consult Housing with any questions about this.
 
2. Seniors who need to be on campus to finish theses or incompletes, but are done with all the new classes they need, can register as Permit to Attend for Services Only (PSO) and pay a reduced tuition in their very last quarter before conferring the degree. The Student Services Center handles this petition.
 
Heads up! Neither of these options qualify a student for a visa or for financial aid, or for athletic eligibility, so be sure to discuss with your advisors whether this is the right step for you.