Obamacare is designed to make health care affordable for everyone, but several million families could get caught in a loophole in the law that leaves them out in the cold.

Those families will find themselves ineligible for Obamacare subsidies to buy their own insurance on the state-based exchanges, even though their coverage at work is considered unaffordable.

That's because the way the Affordable Care Act is written, employers only have to provide "affordable" coverage to their workers, but not to their dependents.

An affordable policy is one where premiums total no more than 9.5% of household income. If a worker's employer-sponsored insurance costs more than that, he can opt to apply for federal subsidies to buy a policy on the Obamacare insurance exchanges.

Companies, however, don't have to meet this criteria when extending coverage to spouses and children. Since employers often subsidize a smaller share of dependents' premiums, many families could pay hefty bills for on-the-job policies. And they're in for a rude awakening when they turn to the exchanges, which could also be very expensive without the help of a federal subsidy.

Nearly 2 million adults and 450,000 children may find themselves in this situation, according to the Urban Institute. More than half are currently shelling out for pricey family policies at an employer or buying coverage on the individual market, which is often expensive too. Just over 571,000 are uninsured.

"It's a big deal for these families," said Matthew Buettgens, senior research associate at the institute. "Those who have coverage will be paying a much higher percentage of their income to maintain it. And it will become harder and harder for them to maintain."

Share your story: Are you signing up for Obamacare?

The Moeller family of Clarks Summit, Penn., find themselves in this situation. They need insurance next year, since their current plan will be discontinued. But none of the options they've seen under Obamacare are very good.

Barbara Moeller is a nurse at a hospice facility who could get coverage from her employer for $218 a month, or about 8.2% of her salary. But were she to add her husband Eric, a stay-at-home dad, to the plan, the monthly premium would soar to $490. Including their daughter would send the cost skyrocketing to $620.

Ineligible for federal help because Barbara Moeller has "affordable" coverage at work for herself, the couple face shelling out hundreds more a month to cover them both on her work policy or having her enroll in a solo policy at work and him in an unsubsidized exchange plan. The cheapest one Blue Cross offers is $334 a month, with higher deductibles and co-pays than they currently pay.

There is a third option that Eric Moeller says he'll likely select: Become uninsured. The family, which drives 15-year-old cars and lives without smart phones and cable television, simply can't handle the premium hike, he said.

The small silver lining: He won't have to pay a penalty for lacking coverage because the policies would cost more than 8% of the family's income.

"If you are going to mandate I do something, you should be ready to help me out with it," said Eric Moeller, who plans to look for work. "There's no way we can afford it."

This quirk in the law will impact spouses such as Eric Moeller harder than it will children because most youngsters can enroll in government health insurance programs, such as Medicaid or the Children's Health Insurance Program, said Joan Alker, executive director at the Center for Children and Families at Georgetown University. But since some parents won't sign their kids up for this coverage, some children will remain uninsured.

Though consumer advocates are pushing for this loophole to be addressed, experts say that lawmakers intended to let employers off the hook for insuring workers' families. Congress was concerned that employers try to push families onto the exchanges if they were forced to extend affordable coverage to everyone.

"I don't know if it will get rectified," said Gary Claxton, vice president at the Kaiser Family Foundation.