After working 40-plus hours a week for probably 40-plus years, it can be hard to hang it up and retire. More people in their 60s, 70s and even 80s are seeking part-time work to fill that void.

Data from the Bureau of Labor Statistics says that by 2026, around 30% of people between the ages of 65 and 74 will continue to work. That number was just more than half that at 17.5% in 1996, showing a trend of more people staying in the workforce.

The benefits to part-time work are many-fold. Extra income is always nice, and working can give a sense of purpose to many. Some may use work to stay connected with their peers, and keep the mind sharp. But what does working part-time mean for your overall well-being in retirement?

Part-time work can be beneficial, but here are some things to watch when it comes to your nest egg, Social Security and Medicare, per CNBC:

Your Portfolio and Part-Time Work

If you’re unsure whether your retirement savings will truly get you through your older years and part-time work can reduce what you withdraw, advisors say go for it.

“For folks where it’s on the bubble of whether their retirement plan is going to work, it can be worth it to work — and that doesn’t mean full time,” said Nick Defenthaler, a certified financial planner with the Center for Financial Planning in Southfield, Michigan. “Part-time work will reduce what you have to take from your overall portfolio.”

Any amount you earn from a job could reduce (or eliminate) what you need to withdraw from your retirement account. Leaving those assets invested, where they can keep growing and benefit from compound interest, will pay off down the road.

“You don’t have to make big money,” said CFP Matt Rogers, director of financial planning at eMoney Advisor, a financial software firm that works with advisors. “Just having some income to reduce withdrawals is good.”

Social Security and Part-Time Work

If you already have reached your full retirement age (as defined by the government) and are receiving Social Security, you can earn as much as you want without any reduction in your benefits (although up to 85% is subject to federal income taxes, depending on your overall income).

If you haven’t yet reached that magic age, however, it’s a different story.

While delaying Social Security for as long as possible means a higher monthly check, many people take it as soon as they can — age 62 — or soon thereafter.

If you start getting those monthly checks early, there’s a limit on how much you can earn from working without your benefits being affected. For 2019, that cap is $17,640. Earn more than that and your benefits will be reduced by $1 for every $2 you earn over that threshold.

Be aware, too, that the reduction in benefits can come as a surprise — and all at once, said CFP Peggy Sherman, a lead advisor at Briaud Financial Advisors in College Station, Texas.

Say you earned $5,000 over the limit in a given year and the Social Security Administration discovers it later when it does its annual review of your tax return.

“They don’t adjust your benefits just a little bit — they’ll stop your benefits until the amount is paid back,” Sherman said. “It can be a very ugly surprise.”

Then, when you reach full retirement age around age 66 or 67 — the exact age depends on your birth year — the money comes back to you in the form of a higher monthly check.

However, “it can take up to 15 years to recoup that reduction,” Sherman said. “They don’t give it back all it once. You get a little each month.”

Also, if you are one of those early takers who is working and you reach full retirement age during 2019, then $1 gets deducted from your benefits for every $3 you earn above $46,920.

Medicare and Part-Time Work

Depending on your overall income, money from a part-time job could trigger additional costs for Medicare.

Higher earners pay more for Medicare Part B (outpatient coverage) and Part D (prescription drugs). The higher premiums start at income above $85,000 for individuals and $170,000 for married couples who file joint returns.

However, less than 5% of Medicare recipients are subject to it, according to the Social Security Administration.

Whether you pay more is based on your modified adjusted gross income — your adjusted gross income, or AGI, plus your tax-exempt interest income. The government uses your tax return from two years earlier to determine whether you must pay higher premiums.

CNBC’s John Schoen contributed to this report.