BerlinWalk tool
A hotel, a whole apartment and a set of hostel beds do not get more expensive in the same way, so the cheapest one changes as your party grows and your stay gets longer. Put in the three prices you are actually looking at and the grid below redraws to show which one wins in every case.
These four numbers are placeholders so the grid has something to draw. Replace them with the actual prices in the tabs you have open, otherwise the answer is about my numbers instead of your trip.
Every square is one combination of nights and travellers, coloured by whichever option costs least there. The darker the square, the bigger the gap. Your own trip is the ringed one.