Filing taxes can be complicated, but a simple mistake or a slight exaggeration could warrant an audit from the Internal Revenue Service.

Here’s how someone is chosen for an audit: An IRS software program may randomly select the taxpayer and compare the return to other similar returns to detect any anomalies, or the taxpayer in question may be linked to a family member or business partner who is being audited.

Also see:The tipping point: When to use tax software instead of seeing a professional

The IRS can audit returns up to three years old. Inaccuracies could lead to penalty charges: 20% of the disallowed amount for filing an “erroneous claim for a refund or credit,” the IRS stated, or $5,000 if the tax return was deemed “frivolous,” where there isn’t enough information to assess correct or incorrect information.

In more serious cases, taxpayers could also be brought to trial and face criminal charges of tax evasion or fraud.

And now for the good news: The IRS audited less than 1% of returns in 2017, and that number was expected to be lower last year, said Joy Taylor, a tax expert at personal-finance site Kiplinger. (The most recent IRS data is from 2017). Does that mean you should be carefree about filing? Absolutely not. Here are red flags tax experts say you should avoid:

Turning into the most generous person in America

One of the most common reasons for an audit is when the taxpayer is taking higher-than-average deductions in relation to his income. This can come from various types of deductions: Charitable contributions, real estate interest or student loans interest.

The IRS has a sense of what’s a fair amount of deductions based on income brackets, Taylor said, and if someone blows past that threshold, it could lead to an audit. If someone earned $120,000 and claimed $50,000 of charitable contributions, they’d smell a rat.

If you are that generous, have the proof ready in case of an audit. Many legitimate charities give receipts to donors, so keep them safely stored.

Don’t miss:These financial tips from the ‘sports tax man’ can up your money game

Withdrawing from a retirement account early

There are some scenarios where an individual is allowed to take withdrawals from a retirement account prior to 59 ½ years old — when, for example, the taxpayer uses a portion of that money for a first-time home, qualified education expenses or emergency medical costs.

But the IRS charges a 10% penalty (on top of the tax paid on the withdrawal) when none of those exceptions are met. Almost 40% of taxpayers did not report the withdrawal when they did not qualify for the exceptions, according to Kiplinger, but the IRS still knows the withdrawal was made.

The IRS is notified of taxable early withdrawals from an individual retirement, according to personal-finance site The Nest, and the government’s system will likely notice if the taxpayer did not include it in reportable income.

(This story was republished on Jan. 30, 2019.)