Lrr liquid retained ratio calculation

Hello, long time reader first time poster.
I have a question regarding lrr in vst tools that I have been trying to work out for ages. What is the formula to work out the lrr for each individual brew as I have noticed it changes a lot between brews and also depending on what device (immersion/drip) is used too.

Variables are
Dose (d)
Brew water weight (bw)
Beverage weight (bev)
Tds (tds)

The formula I have that comes close is

Lrr = (bw - (1-(tds/100) x bev)) / d

So work out how much of the beverage weight is actually just water. Subtract this from the brew water to work out the difference then divide by dose of coffee used

That is with co2 and moisture both equal to 0. How do you include these variables into the equation?

Am I over thinking things. Is lrr something simple to calculate?

Thanks in advanceā€¦