Honestly… it’s possible, but it’s tight, and Norway is the part that will try to murder your budget.
Your plan is actually pretty sensible (hostels, cooking, walking, limited tours). The numbers aren’t insane. But a few things jump out:
Accommodation: €1,400–1,600 for 40 days is like €35–40/night. In May, in big cities (Copenhagen, Oslo, Bergen, Stockholm, Helsinki) that’s going to be hard unless you snag dorm beds early and accept “meh” hostels sometimes.
Food: €800 works if you’re really cooking and doing cheap groceries. Eating out in Norway and Denmark will blow this fast.
Internal transport: €800–900 across 5 countries is the other pressure point. Trains/ferries in Norway add up fast.
Norway specifically:
You’re doing a lot of places (Oslo, Bergen, Voss, Balestrand, Stavanger). That’s awesome, but it’s also a lot of transport nights.
Bergen 4–5 nights doesn’t sound crazy to me. It’s a good base, and you can do day trips without constantly moving.
Balestrand 2 nights: I’d only do 2 if you really want the slower fjord vibe. If budget gets tight, this is one of the easiest cuts to 1 night (or swap to a cheaper base that has more hostel options).
If I were trying to keep this under €4,800:
Book hostels early, especially Copenhagen/Oslo/Bergen/Stockholm.
Be ruthless about “moving costs” (every transfer day is usually extra money).
Pick one splurge experience in Norway (fjord cruise or a big scenic ride), not a bunch.
Have a realistic buffer for “oops, everything is expensive today” days.
I don’t think you need to cut to 30–35 days, but if prices look bad when you start booking hostels, shaving a week (likely from Norway + Denmark) makes the whole budget breathe again.