Check google flights, play with dates, locations and then search for lodging costs.
Portugal does tend to be cheaper, but prices have increased over the past few years.
I have found that even in "expensive" destinations, if there are cheap flights and I can find affordable lodging...it becomes a great option.
Ex: DC-Copenhagen...it's a very expensive city BUT some of the best deals are to/from Copenhagen. Play airlines is a budget airline and they fly out of IAD and BWI. The cheapest tickets for a family of 4 (2 adults, 2 kids 2-11) is for $1536 for 4 tickets with personal items only. The trick I've done is to buy maximize the size of our personal items (you can use kids backpacks or buy $20-40 personal item backpacks- I have this one that worked perfectly
https://www.amazon.com/gp/product/B0B8V26319/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&th=1) and I got a few cheap compression bags to go in it that we use again and again. Each carry-on costs roughly $57 each way. One thing I have done is pay ONLY for a carry-on on the way back for when I bring back goodies and I need the extra space.
Then in Copenhagen, you could stay at a family hostel with a private room. I have personally stayed at this hostel. My kids had fun bunk beds, there was an excellent buffet breakfast, and it was super close to everything
https://www.meininger-hotels.com/en/hotels/copenhagen/hotel-copenhagen-urban-house/ There was a play room for the kids. there are several other similar places in Copenhagen. For my family of 4, this comes out to $138 per night INCLUDING a buffet breakfast (so you could avoid that if you wanted to save a bit of money, but it was a good value to me.
So say you go to Copenhagen for 1 week: $2,500 + food/activities. You could definitely cut down on food costs if you choose to not eat out a ton and buy a lot of local food at the grocery stores/bakeries and cook lunch/dinner mostly yourself with 1-2 nicer meals.
Alternatively, you could stay a few nights in Copenhagen and take the bus or train south into Germany. They have Meininger hostels and A&O hostels all around europe and those are even cheaper (just check reviews and see how far they are).
There are definitely ways to do it, you just have to be very thoughtful, and plan far ahead! I am finding that it is cheaper for my family to travel to europe over christmas than over the summer (but I also book my tickets far out in advance).