With principal, interest rate and inflation
p = 100000
r = 0.12
i = 0.06
after two years you have
p (1 + r)^2 = 125440.00
However, accounting for inflation, in today's value that is
125440/(1 + i)^2 = 111641.15
This is the same as adjusting for inflation after each compounding period, which would be necessary if there were intervening cash flows.
year1 = p (1 + r)/(1 + i) = 105660.38
year2 = year1 (1 + r)/(1 + i) = 111641.15
See http://financeformulas.net/Real_Rate_of_Return.html
also https://money.stackexchange.com/a/56847/11768
The quick and dirty method you may find mentioned elsewhere is
p (1 + (r - i))^2 = 112360.00
but that's just lazy and wrong.
It is more rigorous to use an extra step calculating x
x = i (1 + r)/(1 + i)
p (1 + (r - x))^2 = 111641.15
The Q&D method is wrong because (1 + (r - i))^2 where r=12 and i=6
reduces to 1.06^2, whereas
1.12^Agrows faster than
1.06^A`.