Spanish flag

Quedar vs. restar vs. sobrar

The Spanish verbs quedar, restar, and sobrar can all be translated as to be left or to remain, but they are used in entirely different contexts. The main differences lie in their everyday frequency, their level of formality, and whether they imply a simple remainder or a literal excess of something.

Quedar

The verb quedar is the most common and versatile way to express that something is left or remains available in everyday conversation. It neutrally states the fact that a certain quantity of time, money, or objects still exists after a portion has been used, taken, or passed.
Solo nos quedan cinco minutos para terminar el examen.
(We only have five minutes left to finish the exam.)
No queda leche en el refrigerador.
(There is no milk left in the fridge.)
Me quedan tres boletos para el concierto de esta noche.
(I have three tickets left for tonight's concert.)
Queda un pedazo de pastel en la mesa por si tienes hambre.
(There is one piece of cake left on the table in case you are hungry.)
¿Cuántas páginas te quedan por leer?
(How many pages do you have left to read?)

Restar

The verb restar is a more formal or literary alternative to quedar when meaning to remain. It is frequently used in journalism, literature, or formal announcements to indicate remaining time, distance, or tasks, but it is rarely used in casual, spoken Spanish for this purpose.
Restan dos semanas para las elecciones presidenciales.
(Two weeks remain until the presidential elections.)
Al equipo le restan tres partidos en esta temporada.
(The team has three games left in this season.)
Solo resta decir que estoy muy agradecido por su ayuda.
(It only remains to say that I am very grateful for your help.)
Aún restan varios kilómetros para llegar a la cima de la montaña.
(There are still several kilometers left to reach the top of the mountain.)
No resta ninguna alternativa viable para solucionar este problema.
(There is no viable alternative left to solve this problem.)

Sobrar

The verb sobrar specifically means that something is left over because there is an excess or surplus. Unlike quedar, which simply states what is still there, sobrar implies that you have more than enough of something, leaving an unneeded or extra amount behind.
Hicimos tanta comida para la fiesta que nos sobró mucha.
(We made so much food for the party that we had a lot left over.)
Compré el boleto y me sobraron cinco dólares.
(I bought the ticket and I had five dollars left over.)
En esta habitación sobran tres sillas.
(There are three extra chairs left over in this room.)
Llevamos demasiada ropa para el viaje y nos sobró casi toda.
(We packed too many clothes for the trip and had almost all of them left over.)
Si te sobra tiempo esta tarde podemos ir al cine.
(If you have time left over this afternoon we can go to the movies.)

Summary

In summary, use quedar for normal, everyday situations to express what still exists or is available. Choose restar for a more formal, elevated way to say that time, distance, or tasks remain. Finally, use sobrar when you want to emphasize a surplus, indicating that something is left over because you have more than you actually need.