Yet some people find it difficult to commit to building up an H.S.A. to save for health needs. At the end of last year, there were nearly 17 million accounts with balances totaling more than $30 billion, according to the H.S.A. tracking firm Devenir. But most of the money sits in savings accounts, paying anemic interest rates; just 14 percent of the total was in investment accounts with more growth potential (and, of course, the possibility of loss).