Consumers can get a tax break on the cost of certain 23andMe genetic tests, thanks to a recent ruling from the IRS.

Only parts of the test that relate directly to health—like genetic risks for lung or heart disease—are eligible for tax write-offs, according to a copy of the Internal Revenue Service’s decision.

An IRS spokesman declined to comment, saying legally he could not disclose tax return information. 23andMe posted a redacted copy of the IRS letter on its website July 22. The Wall Street Journal first reported the IRS’ decision.

The decision means health savings and flexible spending accounts can be used to pay for part of a 23andMe’s health and ancestry kits in the same way these accounts cover doctor visits, copays, and sunscreen. The Mountain View, Calif.-based company is the only direct-to-consumer genetic testing company that the Food and Drug Administration has authorized to market its tests as medical devices.

“This is novel in that it speaks directly to how the IRS views direct-to-consumer genetic testing that includes health information and that’s regulated by the FDA,” Jacquie Haggarty, 23andMe’s vice president and deputy general counsel, said in a July 22 interview."Until now, it was unclear how the IRS would view direct-to-consumer genetic testing that’s FDA regulated.”

The eligible portion of the test kit that’s deemed medical care, such as tests that indicate a genetic predisposition to certain diseases, carrier status of certain diseases, and wellness information, is all FDA-regulated information, Haggarty said.

Anyone who bought a health bundle on or after Jan. 1 can use their health savings or flexible spending accounts to pay for up to $117.74 of the purchase price. That amount is based on a proportion of the current $199 retail price, so if someone bought a kit on sale, or the price were to shoot up, the eligible amount also would fluctuate. 23andMe posted a calculator on its website to make it easier for consumers to determine the eligible amount.

The ruling doesn’t set a precedent for the genetic industry as a whole, because 23andMe is the only company of its kind to be regulated by the FDA.

“We’re kind of an industry of one,” Haggarty said. The FDA authorization was important, she said, because it helps the IRS determine which services constitute medical care and are therefore eligible for health savings and flexible spending purchases.

Haggarty said the ruling also provides insight into how the IRS views this type of service. It demonstrates the IRS recognizes that with a bundled service, “part of it can be considered medical care, and part of it not, and that it’s up to the consumer to make that allocation,” Haggarty said.

Genetic counseling company InformedDNA said in response to a request for comment that genetic counseling is an important part of interpreting these tests and can also be paid for with health savings accounts.

“People are often confused about what 23andMe tests can and can’t tell them, and are frequently disappointed to learn another test might have been more helpful based on their health risks and what they would like to learn about them,” InformedDNA said in a statement.