There’s so many variables you can choose to count or ignore that I think it renders any “formula” fairly pointless. Most important would be the axle path, but also the BB path as the suspension compresses.
If you massively over simplify it and treat suspension compression as directly proportional to BB height (ie as your wheels goes up, your bb drops the same amount) then your 12mm of sag on the shaft rough equals 35mm drop in BB height:
(140/48.25) x 12 = 34.81865…..
The same formula with give you a rough estimate of additional BB drop for given extra sag at the shock, essentially 1mm at the shock giving a bit less than 3mm lower BB height.
But there’s so many things not being taken into account that that can only be a very rough guide.