I've created a package with which you can do a lot of stat calculations within Lua scripts with ratings, percentages, item stats, effect stats, etc. Almost all the things which I can do in my LotroPlan spreadsheet. I basically did some translations of functions in starbasic to lua.
I'm streamlining CalcStat at the moment for future expansions. I'm using now a central standard progression scheme, just like the game does. I only need to feed it a progression base value and out come the values for all levels.
It's used for example in here in the calculation of item stat points (a blue essence in general contains 1 point) for mastery and mitigation:
As you can see mitigation on items is based on the medium mitigation base value. The progression value is multiplied by the 2nd input constant and that result is multiplied again with a progresssion adjustment value specific for ratings.