your real gain is only 50K.
You are correct about the nominal gain in dollars (ignoring inflation). It is $50,000.
This comes out to a 2% rate of return. But that is not totally correct
This is incorrect in every way. The nominal gain is $50,000 but you can't just say that the "average interest" is $50,000 / 25 / $100,000, because you limited yourself to 25 years only. It became an Annuity, not a Perpetuity.
The actual nominal interest rate is 3.397% (ignoring inflation). In this calculator, you paid $100,000 at the beginning, got $6,000 each year for 25 years, and is left with $0 at the end of 25 years, and made a nominal gain of $50,000.
You can imagine that you are a bank lending $100,000 to the insurance company, and the insurance company is paying you back $6,000 for each of 25 years (last year is still $6000 payment, not $100,000). The $6,000 each year includes both principal component and interest component. It is literally a loan that needs to use Amortization Table.

In fact, if you live long enough (e.g. 100 years since buying), the annuity becomes a perpetuity, where the actual nominal interest rate is very close to 6.000% (ignoring inflation).

So how do you account for inflation? There are 2 ways:
You don't. You simply compare the expected nominal interest rate of 2 products, i.e. 6% annuity of 25 years vs 25 years United States Treasury Fixed Interest.
You compare the expected nominal interest rate of 2 products above and deduct the Federal Reserve target inflation of 2% from both products. This is meaningless in making decisions. One product's inflation won't be magically different from another product's inflation.
For reference this is the 6% annuity product:
| Years Alive |
Nominal Interest Rate |
| 5 |
-30.191% |
| 10 |
-8.351% |
| 15 |
-1.289% |
| 20 |
1.803% |
| 25 |
3.397% |
| 30 |
4.306% |
| 35 |
4.860% |
| 40 |
5.215% |
| 45 |
5.449% |
| 50 |
5.608% |
Given that long term United States Treasury Fixed Interest rate is around 4.5%, I would say that you need to be alive for around 33 years to break even.
*I forgot to say that there is no "formula" for interest rate per year. You need to rely on the algorithm of the Financial Calculator or Excel. Alternatively, binary search to solve an equation. In Excel it is:
=RATE(25,6000,-100000,0,0)