The end of 2014 is quickly approaching. While that conjures up warm memories of Thanksgiving and holiday visits with family and friends, the Fool in us is aware of other issues. Foremost among them: how to avoid paying capital gains tax on stocks.

Screen Shot

It will take a little elbow grease to avoid capital gains tax on stocks. Photo: efile.com via Flickr.

My family realized a $5,000 capital gain on stocks, and we'll pay exactly $0 on that gain -- we get to keep it all! I can't guarantee the method we used will work for everyone, but I am certain a number of readers out there can benefit from this approach.

Read below to see whether you qualify and can reduce your tax bill come April.

Let's revisit those tax tables
Let's get the basics out of the way first. If you have owned a stock for longer than a year, the IRS considers it to be a long-term holding. Capital gains on long-term holdings are taxed at different rates depending on your tax bracket. Here's what it looks like, with a little note from me.

Screen Shot

If your family falls in the first two tax brackets, you owe zero capital gains tax.

"That's nice," you might say, "but what are the thresholds for being in that 15% tax bracket?"

I'm glad you asked. For 2014, those tax brackets look like this:

Filing Status

Maximum Taxable Income for 15% Bracket

Single

$36,900

Married, filing jointly

$73,800

Married, filing separately

$36,900

Head of household

$49,400

Source: IRS.

That's not the whole story
Here's the next comment I usually hear, especially from Foolish readers who have enough money left over that they're interested in investing: "Whoa, there's no way that I'd fall into that category. I make way too much."

That may be so, but the whole story hasn't played out yet. You might notice that the chart above says taxable income, not gross income. Many deductions can bring your taxable income down. Here are some of the most common:

  • Standard Deduction: Ranges from $6,200 to $12,400 depending on your filing status.
  • Personal Exemptions: You can take a deduction of $3,950 for every dependent, including yourself and your spouse, in your household.
  • Child Tax Credit: You can deduct $1,000 per child, up to $3,000 total.
  • Flexible Spending Accounts (FSAs): Usually offered through your employer. You can deduct up to $2,500 from your taxable income for qualified healthcare expenses.
  • Health Savings Accounts (HSAs): If you don't have access to FSAs, and your insurance allows you to open an HSA, you can sock away between $3,300 and $6,500 -- depending on your filing status -- and all of it is deductible.
  • Individual Retirement Accounts (IRAs): Any money put into a traditional IRA -- up to $5,500 for retirement purposes -- is also deductible.

This is by no means an exhaustive list, and if you earn over a certain amount, these might not apply to you. But for most people, these are the most useful deductions to consider.

Avoiding the capital gains tax on stocks: how it works in the real world
While I'm not going to reveal my family's total income in 2014, I want to show you how high our income could be while still allowing us to harvest $5,000 in capital gains without having to pay any capital gains tax.

Consider the various deductions that we will take this year.

Deduction

Amount

Standard

$12,400

Personal Exemptions

$11,850

Child Tax Credit

$1,000

Health Savings Account

$6,500

Half of Self-Employment Tax

$5,700

Health Insurance Premiums

$4,140

Total

$41,590

There are some benefits here, especially in terms of self-employment deductions, for which many might not be eligible. But there are several others that you could qualify for if you do a little research on the IRS website.

But let's get back to the simple math. If the 15% threshold on taxable income for a married couple filing jointly is $73,800 -- but we're deducting $41,590 -- that means our total salary for a year could be as high as $115,390! That changes the situation considerably.

Because our family income is below $110,000 for the year, that leaves us more than enough breathing room to harvest $5,000 in capital gains and pay absolutely no tax on it.

Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.