This article originally appeared on the Motley Fool.

Your Social Security retirement benefit depends on how much money you earned throughout your lifetime, up to the annual Social Security taxable maximum each year, as well as the age at which you start collecting. Here's a breakdown of how the Social Security Administration calculates your monthly benefit, as well as a calculator that can estimate yours.

Your primary insurance amount

The first piece of the puzzle that determines how much Social Security you'll get is known as your primary insurance amount, or PIA. This is your monthly benefit if you decide to claim Social Security at your full retirement age.

Unlike many pension plans, which only take your last few years of income into account, Social Security looks at your entire work history. Every year's earnings from your entire career are first indexed for inflation, up to the maximum Social Security taxable wages for each year.

Next, the 35 highest inflation-adjusted years are added together and averaged, to produce your lifetime average Social Security earnings. This amount is divided by 12 to determine your average indexed monthly earnings.

Once your monthly average is determined, it is applied to this formula to determine your primary insurance amount:

  • 90% of the first $885
  • 32% of the amount above $885, but less than or equal to $5,336
  • 15% of the amount over $5,336

For example, let's say that your averaged index monthly earnings were $4,000. Your primary insurance amount is 90% of $885 ($796.50) plus 32% of the other $3,115 ($996.80), for a total of $1,793.30 per month.

What is your full retirement age?

As I mentioned, your primary insurance amount is your calculated Social Security benefit if you start collecting benefits at your full retirement age.

The retirement age is currently 66 years old for Americans born in 1954 or earlier, but is set to transition to 67 over the next several years. Specifically, here is your Social Security full retirement age, depending on your birth year.

Your benefits will be different if you claim before or after full retirement age

Although you have a specific full retirement age, you can choose to claim Social Security retirement benefits as early as age 62, or as late as age 70. In other words, you have an eight-year window to start your benefits. The majority of Americans claim Social Security before they reach their full retirement age.

If you choose to start your Social Security benefits early, your monthly benefit will be  permanently  reduced. Depending on how long before full retirement age you claim your benefits, there are two reduction rates that can be applied:

  • Your benefit will be reduced by 5/9% per month (6 2/3% per year) for each month before full retirement age, up to 36 months early.
  • Beyond 36 months before full retirement age, your benefit will be further reduced by 5/12% per month (5% per year) for each month, as early as age 62.

So, if your full retirement age is 67, and you choose to claim benefits at 62, your primary insurance amount will be permanently reduced by 30%.

On the other hand, your benefit can be permanently increased if you choose to wait until after your full retirement age. For each month you wait, your benefit will be increased by 2/3%, an 8% annual rate of increase, and this can increase your benefits until you reach 70 years of age.

Estimating your benefits

If you haven't done so already, log on to www.ssa.gov and create a "my Social Security" account. Here, you'll be able to access your latest Social Security statement, which among other things, can give you an estimate of your retirement benefits, based on your work history.

For a quicker estimate, here's a calculator that can give you an idea of how much you and your spouse could potentially get from Social Security.

Depending upon your current earnings, Social Security can be a significant part of your retirement income. However, many factors will impact the benefit you may receive. Use this calculator to approximate your Social Security benefit. For a more accurate estimate, taking into account your earnings history, contact the Social Security Administration at 1-800-772-1213 or visit www.ssa.gov.