Pharmaceutical giants Eli Lilly and Johnson & Johnson have decided to take advantage of Puerto Rico's new tax exemption law to repatriate some $500 million in accumulated earnings to the United States.

This is expected to be the first in a stream of Puerto Rican earnings flowing to the mainland under the new law.

The law, enacted in June, eliminated 100 percent tax exemption, the cornerstone of Puerto Rico's industrial development program for the past 30 years, and granted partial exemption for companies newly investing in Puerto Rico.

One section of the law allows firms that already had been granted 100 percent exemption to convert to partial exemption. In exchange, the firms will be given a break on repatriation of earnings. The Commonwealth will reduce its tollgate tax, which is a percentage skimmed off the top of the repatriated earnings, from a standard 10 percent to 4 percent.

Eli Lilly and Johnson & Johnson were the first firms to take advantage of this provision. By June 30, they will have repatriated about $274 million, paying a tollgate tax of about $10.9 million to the Commonwealth.

On the other sicde of the agreement, the Commonwealth treasury expects to receive more than $100 million in income taxes for the 10-year to 15-year partial exemption period, officials said.

Eli Lilly has agreed to convert four subsidiaries, which all have only six months to six years remaining in their original 100 percent exemption grants.

The firms' board of directors had voted more than a year ago to liquidate the subsidiaries when their exemptions expired, government officials said. Not only would full application of taxes cut substantially into profits, but also the firm would be able to repatriate its accumulated earnings tax free after liquidation, they explained.

Under the present conversion agreement, the life of the tax exemption will be extended another 10 years. The subsidiaries will pay taxes on 22.3 to 26.7 percent of income for the remaining term of the original exemption. Then they will be exempt from taxes on 50 percent of income for five years and on 35 percent of income another five years.

The company will repatriate a total of $310 million in earnings accumulated before 1978.

In the past, many companies closed their Puerto Rican operations when full exemption expired, officials said. Now with the conversion option, the life of these companies and the jobs they provided in Puerto Rico will be prolonged, they claimed.

Johnson & Johnson will convert 17 subsidiaries which still had 10 to 15 years to run in their full tax exemption grants.

The firm chose an alternate conversion plan under which the subsidiaries will be 90 percent tax exempt for the remainder of their exemption periods. The time periods will not be extended.

Johnson & Johnson is expected to repatriate in total of $190 million in accumulated earnings.

On current earnings, the firms must pay a tollgate tax of 5 percent, in addition, they must place half of their earnings for five years in long-term investments such as plants and equipment, government bonds and mortgage funds.

Johnson & Johnson will receive a special formula allowing it to credit two-thirds of the amount it pays in income taxes toward the 5 percent tollgate tax.

The Internal Revenue Service recently has been investigating many companies for shifting patent rights, royalties and internal pricing so that profits will be reflected in the Puerto Rican subsidiaries where they are not taxed.

The IRS already has reallocated some $22 million of Eli Lilly's 1971-1973 Puerto Rican operations, an action which the company is appealing in court. Earnings re-allocated to the mainland are subject to the 48 percent U.S. corporate tax rate.