I mean the way we'd do it is a series of sawtooth climbs, since weight typically has a profound effect on climb performance.
Other than a nerd-sniping exercise I don't see the point of going down this rabbit hole, because on an aircraft with pax the pilot's job isn't to screw around playing Chuck Yeager and estimate fuel with test pilot techniques.
If they can't fly with confidence that they're safe, then the pilot's job is to put the fucking aircraft on the ground as soon as able.
I was thinking more of a secondary passive reading done by a computer in the background to catch the simple cases where the plane is unusually light for the entered distance.