It’s no secret that these days, many people are juggling care for their children, themselves and their parents. This situation can be emotionally draining and it’s often financially challenging — there might not be enough money to go around.

Each situation is unique, and every person will feel different about various obligations. There isn’t a one-size-fits-all solution, but everyone needs a plan. These important considerations are a good place to start:

Prioritizing elder care, retirement savings, and college savings.

Saving for retirement has to be a priority. If you don’t have enough retirement savings, your children could face the same burden you do today: supporting and caring for an aging parent.

Given this, saving for retirement should be priority one for most and saving for your children’s college education should be priority three. After all, there are student loans and scholarships, but no one offers retirement loans and scholarships. If your children have to work during high school to save money for college, that’s okay. If they have to take out student loans, that’s also okay. In the long run, they’ll likely be far better off if you don’t have to rely on them during your retirement years.

That covers priorities one and three; priority two is helping your parents. If your parent isn’t healthy and doesn’t have savings, government programs may be able to provide support. Note, however, that some of these programs are hard to navigate, so it may take time to sort out your options. A professional may be able to help with this.

Planning for your future: decide what you can live with.

You may feel obligated to care for your parent by quitting your job and becoming a full-time caregiver, but there are other options. You could continue to work (and still contribute to a 401(k) plan) and hire a caregiver instead. Even if you use most — or all — of your net income to pay for your parent’s care, you’re still coming out ahead in the long run because you’re saving for retirement.

If you have unexpected bills, it can be hard to place much weight on putting money away for your retirement, but don’t let yourself fall into that trap.  Suppose you’re making a $500 contribution to your 401(k) plan each month.  If you take a year away from work, the amount of money you’re no longer contributing to your 401(k) can add up fast.

Also, if you opt to pay for care, your parent will be in the hands of a professional, either in a facility or in your home. There’s a certain sense of calm that can come with knowing your loved one is being well cared for. Plus, if you don’t quit your job, you won’t need to deal with a stressful job search — and possibly a cut in pay and/or lower-level role — when you try to return to the workforce.

If you feel you must be the primary caregiver, try exploring work-from-home options. In this “gig economy,” there are plenty of options for freelance, contract, and part-time work.

If thinking about leaving your job has you worried about eligibility for college financial aid, remember that your assets and income make up just a small part of the Federal Student Aid formula. Your child’s assets and income make up a much bigger part — so given this, it could make sense to keep a 529 college savings plan in your name.

There are a lot of considerations when you’re caring for three generations. Immediate needs can make it difficult to prioritize objectively, but don’t sacrifice your own long-term financial needs. If you have a plan, you can stay on course toward a more secure future for both you and all of your loved ones.