When you graduate, you might end your academic journey with more than a diploma in hand — you could wind up with a generous cash gift, too.

The average person giving graduation gifts last year planned to spend about $53 on each, with cash being the most popular present, according to the National Retail Federation’s 2016 Graduation Spending Survey. If 10 people were to give you a monetary gift in that amount, you’d pocket about $530.

So what should you do with your graduation money? Put it toward that trip to Europe you’ve been dying to take or the student loan balance hanging over your head? Ultimately, it’s up to you.

“When you’re young, your decisions are important and should align with your goals, your circumstances and your values,” says Jason Kirsch, a certified financial planner in Santa Monica, California. “That will prevent people from regretting things going forward.”

Factor your savings, debt and job prospects into your decision. Here are some recommendations to get you started.

Save first

Building an emergency fund is an important first step toward financial health. You probably won’t own a house fresh out of college and therefore don’t have to worry about the cost of homeownership-related emergencies, but you still might face unexpected expenses like car repairs or medical bills.

Having a $500 cushion is a solid foundation. In the long term, aim to save enough to cover three to six months’ worth of expenses. Your graduation gift alone might not be enough to get you there, but any emergency reserve deposit helps.

For nonemergency costs, set up a general savings account, if you don’t already have one. Tuck away some of your gift to cover living expenses like gas or work clothes, even if you live at home with your parents rent-free, says Donna Wood, a certified financial planner in Haymarket, Virginia. Or think big and save for goals like a new car.

» MORE: How to save money

Invest for your retirement

Saving for retirement might not be top of mind when you’re young. But the earlier you contribute, the better off you’ll be in the future. Even a modest contribution from your graduation haul will work to your benefit.

At an assumed 6% average annual return rate, a $100 investment at age 22 will reach $1,226 by age 65. This can get you in the habit of saving, and watching your money grow might add extra motivation. Consistent contributions are where compound interest really pays off. If you can scrape together $25 a month to add to that initial deposit, you’ll have $57,495 by age 65.

If you have a job lined up that offers a 401(k) and company match, make sure to contribute enough to get the full match. Consider opening an IRA as a supplement, or if you don’t have access to a 401(k).

» MORE: How to manage money in your 20s

Tackle crippling debt

If expensive textbook and laptop purchases resulted in high-interest credit card debt, make paying it down your next priority. Once it’s gone, use a budget calculator to learn how to allocate your money and avoid future debt.

Lingering student loan balances often spur more anxiety than credit card debt. But, generally, there are options available to help you handle this lower-interest debt, like modified repayment plans, tax deductions and a six-month grace period after graduation.

“I wouldn’t worry about putting gift money toward student loans right off the bat unless you’re working with a significant amount of money or it just gives you a better peace of mind,” says Ben Brown, a certified financial planner in Bethesda, Maryland. “It’s going to go a lot further if you put it towards really focusing on your most valuable asset as a young person, which is your earnings potential.”

Spend it on yourself

If you have no job in place, Brown suggests spending the money to boost your prospects. Use a professional resume service or career coach, or take additional courses to develop your skills.

And it’s OK to treat yourself. A graduation gift is meant to be a reward for your achievement, after all. If you want to improve your financial habits but still indulge before entering the workforce, Brown recommends spending between 10% and 20% of the gift on fun purchases. If you’re comfortable with your financial situation, give yourself more leeway. Go ahead and take that trip. Update your wardrobe. Buy a new phone.

Lauren Schwahn is a staff writer at NerdWallet, a personal finance website. This article was written by NerdWallet and was originally published by USA Today.

The article Should You Spend, Save or Invest Your Graduation Gift? originally appeared on NerdWallet.

Related Post: 9 Tips for Paying Off Your Credit Card Debt