For years, higher earners employed the practice of putting investments in their children's names to avoid higher taxes on their gains. But then the IRS got wise to that ploy and implemented what's known as the kiddie tax in order to put a stop to it. The kiddie tax kicks in when children under a certain age limit receive too much money in unearned income. Though the kiddie tax used to apply to children under 14, now, any child under 19 can trigger the kiddie tax, as can an older child who's a full-time student. Understanding how the kiddie tax works can help you better plan your investments and avoid unpleasant surprises down the line.

How the kiddie tax works

Children who hold investments often aren't subject to the same tax rate as their parents. The kiddie tax, however, dictates that unearned income above a certain threshold is taxed at the parents' highest rate. Currently, that threshold is set at $2,100. So if your child has a $30,000 stock portfolio that generates a return above 7%, his or her gains for the year that exceed $2,100 will be subject to the kiddie tax.

Mother adjusting her son's school uniform tie

IMAGE SOURCE: GETTY IMAGES.

Why is this a big deal? Typically, a child's investment gains are subject to a lower tax rate. But if you're in the top tax bracket (which is currently 39.6%), your tax rate will be applied to any unearned income your child receives that exceeds the current threshold.

Now keep in mind that the kiddie tax applies to unearned income only, such as that from stocks, bonds, and mutual funds. If your child works an after-school job, those wages won't be subject to a higher tax rate because that income is being earned directly.

Who's subject to the kiddie tax?

Currently, the kiddie tax applies to children 19 or under, as well as children 19 through 23 who are full-time students, and whose earned income equals less than half of their own support for the year. If a child turns 20 by the end of the tax year, the kiddie tax doesn't apply. Similarly, if a full-time student turns 24 by the end of the tax year, his or her investments aren't subject to the kiddie tax.

Avoiding the kiddie tax

The easiest way to dodge the kiddie tax is to read up on the annual threshold and make sure your child's unearned income stays below that limit. Otherwise, your next best bet is to give your child assets that gain value over time, but don't generate taxable income until they're sold at a gain.

Let's say you give your child stock that doesn't pay dividends when he's 15. If your child holds onto that stock and sells it at a profit 10 years later, his earnings will be subject to capital gains, but the kiddie tax won't apply because your child will be above the age limit.

Furthermore, if you put investments into a 529 plan in your child's name to fund a college education, those investments can grow tax-free. And as long as you use those funds to pay for qualified higher education costs, you can sidestep taxes on your gains completely.

That said, the kiddie tax is often unavoidable for investments that generate immediate income. If you're a high earner and are looking at a large amount of gains in a given year, you may have no choice but to accept the taxes they trigger. While it may not be an ideal situation, in some ways, it's actually a fairly good problem to have.