"As long as I can do the work full steam, I will stay on the court," she said. "But when I feel myself slipping, when I slow down in my ability to write opinions with fair dispatch, when I forget the names of cases that I once could recite at the drop of a hat, I will know."
Ginsburg reflected on her 20 years as a justice, touting her commitment to making the principle of equality "everything the founders would have wanted it to be."
"I didn't change the Constitution, the equality principle was there from the start," she said. "I just was an advocate for seeing its full realization."
The 80-year-old justice credited timing for the advancement of equality, saying many of the principles she defends succeeded because society was ready to accept them.
"So it was the change in society that opened the court's eyes and made my arguments palatable when they would not have been a generation before," she said.
Earlier this month, Ginsburg became the first Supreme Court justice to officiate a same-sex wedding. She said gay marriage highlights the "genius" of the U.S. Constitution.