Over the past year, I’ve become an expert on flying and driving long distances with a little travel dictator in tow. It takes time, patience, and forethought to survive these trips with your wallet intact. But I have learned how to travel with a baby without tearing my hair out.

The first time I flew with my daughter, she was a cute little six-month-old who clung to my chest the entire flight. I naively thought that all the horror stories that I had heard till then were total bogus.

Roughly one year, six flights, and seven five-hour car trips later, I see things much differently. However, I have managed to stay sane and frugal by doing something you may not think about – a cost-benefit analysis.

Doing cost-benefit analyses – or weighing the pros and cons of a purchase – has been a life-saver when traveling with a baby.

I even put this to use to decide on best way to make one of my recent outings:

I could drive five hours to a big urban airport in a faraway town to catch a budget flight and save some dollars; or I could go through a nearby local airport.

The surprising winner for me turned out to be our local, regional airport. Even though the ticket cost a lot more, it was cheaper when you factored in hotel cost, long-term parking, and not having to pull over on the side of the road to pick up a dropped bottle for the fifth time.

I also did a cost-benefit analysis to study one of the biggest decisions parents with a child under two will make:

Airlines let children fly for free when they are under two (the lap-infant ticket). This benefit is an incredible deal, and it’s perfect for budget-minded families, right? But this deal isn’t as great as it seems.

While my six-month-old could sit in my lap for hours and not care, my 19-month-old is an entirely different story.

Since Dad isn’t traveling with us, I run the risk of her throwing a tantrum until other kind passengers allow her to sit on their laps (it’s happened).

Without my husband with us, the terrifying thought of my daughter being, well, my daughter meant that I had to weigh the pros and cons of forcing her on my lap for two separate two-hour flights. Pros: save a ton of money. Cons: potentially four hours’ worth of epic tantrums and fights in a middle seat. You bet I bought her a separate ticket for this flight!

So, are you interested in doing a cost-benefit analysis of your trip to save a few bucks or some pillow screams? Here are five starting ideas for how to travel with a baby (and stay sane) using a cost-benefit analysis:

1. Travel Food

Cost is pretty high when you buy directly from the airport or rest stop. However, it may be a good distraction that’s worth the extra cash.

2. Transportation Decisions

There are excellent online tools – like BeFrugal’s “Fly or Drive Calculator” – that help you to figure out what method of transportation is cheapest. In my case, the calculator is telling me that a 17-hour car trip is less expensive, even with hotels and gas, but it doesn’t factor in a kid in a car seat or the wear-and-tear on a vehicle.

3. Rental Cars

Rental cars are affordable these days, but at most airports, you’ll need to take a long bus or taxi ride to a rental company’s outpost. Not so appealing after a redeye. Being picked up by an Uber and renting when you get to your destination may save you precious time and energy.

4. Checked Bags

I choose to fly only airlines that allow for free checked and carry-on bags. Instead of agonizing over how to fit a winter parka in a carry-on, I can come packed and ready to go without having to shell out $25 to $100 per bag. If I do pay for bags, I factor that in the cost of my airline ticket before I book the flight.

5. Hotel Location

Reserving a hotel or hostel in the heart of everything saves cab fares and gives you a central hub in case you need to take a nap. However, if you’ve got older kids or are traveling sans children, you might not need that prime location downtown. Instead, reserve a room someplace that’s near public transportation or at a hotel that offers free shuttle buses.

Doing a cost-benefit analysis may not save you a fortune (or anything at all), but it will help you weigh the pros and cons of all your options so that you can have a stress-free experience.