Direct answer
3–4 days are ideal to experience Quebec City’s main attractions; 4–5 days if you want a relaxed pace or nearby day trips (Île d’Orléans, Montmorency Falls, Charlevoix).
What to explore (high-level)
Sample itinerary (3–4 days)
Estimated costing (per person, in CAD; excludes international airfare and assumes hostel stays)
Estimated total (hostel-focused, per person):
(These ranges depend on eating preferences, tour choices, season, and whether you join paid guided tours.)
Practical tips
If you want, I can: suggest a day-by-day plan with hostel recommendations, or calculate a tighter budget for specific dates and activity preferences.