North Carolina's "bathroom bill" will cost the state more than $3.76 billion over the next dozen years, according to an Associated Press analysis.

The law, which requires that people use the bathroom that corresponds to the sex on their birth certificates, has already resulted in lost business.

Several artists have pulled out of concerts scheduled in North Carolina, and the NCAA avoided the state as a host site for its annual basketball tournament.

The AP used interviews and public records requests to compile its analysis. The news outlet said it is likely underestimating the actual cost of the law.

Bank of America CEO Brian Moynihan said he has spoken with business leaders who have decided to conduct projects in other states.

"Companies are moving to other places because they don't face an issue that they face here," he told a World Affairs Council of Charlotte luncheon last month, according to the AP.

"What's going on that you don't know about? What convention decided to take you off the list? What location for a distribution facility took you off the list? What corporate headquarters consideration for a foreign company - there's a lot of them out there - just took you off the list because they just didn't want to be bothered with the controversy? That's what eats you up."

Still, North Carolina was shown to have had the nation's 10th fastest growing economy in the six months after the law was passed.

The AP analysis found that canceled conventions, concerts and sport events in the state cost more than $196 million. The state is projected to lose out on more than $525 million by the end of 2017, according to the AP, and $3.76 billion by the end of 2028.