NEW YORK (AP) — When employers give workers money to help pay for health insurance, the cash may be subject to taxes for both employer and employee.

The IRS treats money given to workers as compensation, even if it's intended to replace a benefit like insurance, says Steven Friedman, an attorney with Littler Mendelson, a New York-based firm that specializes in employment law.

The way to avoid taxes on cash given in lieu of insurance is to set up what's called a cafeteria plan, Friedman says. These plans give employees a choice between cash or coverage, and if workers decide to take the cash, the money isn't taxable. But setting up a cafeteria plan requires that an employer offers insurance.

If the money is taxable, it's subject to federal, state and local taxes. The money must be reported on an employee's W-2 form at the end of the year. The employer is also liable for Social Security and Medicare taxes, says Jeffrey Berdahl, a certified public accountant with RLB Accountants in Allentown, Pennsylvania.

Employees who use the money to buy insurance on government-run exchanges can offset the income tax if they qualify for subsidies, Friedman says. Individuals whose income is no more than $45,960 qualify for a subsidy. The income limit for a family of four is $94,200.

Some employers are giving workers additional money to help them pay the additional tax.

Giving workers money for insurance can create some problems. Some employers might decide to pay for whatever insurance employees choose individually. That could lead to the employer paying for better coverage for one worker than another, and the employer could be accused of discrimination, Berdahl says.