Life is short, and there's a growing number of people looking into retiring early. And not early like 55 or 60 years old. Early like 40 or 50 years old -- maybe even younger.

But before you kiss employment goodbye to live a life of freedom, it's important to consider how early retirement will affect your Social Security benefits.

In order to determine the impact, you need to know how Social Security benefits are calculated. Then you can determine how much working a few extra years adds to your retirement income.

Six social security cards stacked up.

Image source: Getty Images.

How the government calculates Social Security

Social Security benefits are calculated using an average of your monthly income from the 35 highest-earning years of your career.

Each year's income is indexed to the current year, based on average wage increases, by using a multiplier called the indexing factor. For example, last year, the indexing factor for wages from 2000 was 1.5. So you'd multiply wages earned in 2000 by 1.5 to determine what the wages would have been in 2016.

Each year, there is also a cap on how much of your salary gets taxed by Social Security. That number is $127,200 for 2017, and it's adjusted each year for wage increases. If you earned more than the cap in any given year, then your actual salary is replaced by the maximum value and multiplied by the index factor.

Once you have calculated each year's indexed income, select the 35 highest values, add them together, and divide by 420 (the number of months in 35 years) to get a monthly average.

Once you have that average, the process of determining your benefits is pretty straightforward. You receive monthly benefits based on the tiers below:

Average Monthly Income

Percentage of Wages Paid

Amount up to $885

90%

Amount between $885 and $5,336

32%

Amount over $5,336

10%

Data source: Social Security Administration. 

The extreme progressiveness of the table makes sense, as people with lower average incomes usually have had less ability to save for retirement during their working years, while those with high incomes should have built up a nice nest egg.

But what if you don't work 35 years?

Early retirement means it's unlikely you'll work a full 35 years. To come up with its 35-year average, the Social Security Administration will fill in all those missing years with $0 in earned wages.

So if you only stick around in the workforce for 25 years, you'll get 10 years of $0 to bring down your average. You'd probably figure that having worked just 25 out of 35 years, that would produce a benefit of 25/35 what you'd get if you worked the full 35 years, or 71%.

So how do all those $0 years impact my Social Security benefit?

It's true that because the years with no income bring your average monthly income down, your Social Security benefit is lower than it would be if you kept working a full 35 years. But thanks to the progressive system, you still get most of the benefits you would otherwise.

Below, you can see the results of three hypothetical situations: a person earning $50,000 per year to start their career, a person earning $75,000 per year, and a person earning $100,000 per year. All three earn average wage increases every year, so their indexed wages remain flat. Each of them also chooses to retire after 25 years instead of working a full 35 years.

Here's how much they're giving up in Social Security benefits. (Dollar amounts are given in today's dollars.)

Starting Wage

Social Security Benefits After 25 Years Working

Social Security Benefits After 35 Years Working

Percentage of Full Social Security Benefits Earned After 25 Years

$50,000

$1,466

$1,847

79%

$75,000

$1,942

$2,312

84%

$100,000

$2,282

$2,521

91%

Calculations by author. 

Even at $50,000 in average personal income, you can trade 10 years of freedom for just 21% of your potential Social Security benefits. For many, that might sound like a great trade.

You won't necessarily have that many $0 years even if you retire early

One last thing to consider is that very few people retire to go sit on the couch and watch TV all day. If you find something productive to fill your time, give you a sense of satisfaction, and possibly earn you a little money, then you'll need to report that income to the IRS and pay your taxes. The positive is that this income will count in your average and boost your monthly check when you claim Social Security benefits.

Finding a retirement job could give you the best of both worlds -- greater Social Security benefits in your 60s and the freedom to do what you want earlier in your life.