The actual formula given was a bit more complex, and is something like:
Fuel Cost = Coefficient * (Distance * (Mass / Optimised Mass))^Power
But we can collapse Coefficient and (1/Optimized Mass)^Power together into C, as for our purposes we don't need to worry about them separately. "Coefficient" is just there to get the left hand side to be a nice round number, "Power" has to do with diminishing returns on big jumps by ship, and "Optimized Mass" has an interpretation as what the FSD is rated to move through hyperspace internally, but again, we don't care! We just want to know how varying mass affects distance.
---
Power varies by ship only, I believe. C is an artificial constant containing both "Coefficient" and "Optimized Mass" above. "Coefficient" depends only on ship, I think, "Optimized Mass" given its intepretation probably depends on what FSD you load, so C will change with FSD. What changes by FSD class and rating also is the left hand side (if you load a 5B FSD into your asp, you will no longer use 5 T per jump, but some smaller number that I don't remember offhand, since I always use A rated FSDs). Of course loading a 5B FSD will also change the total hull mass since 5B is heavier than 5A.
Since we can generate many more than just two equations by varying mass and jump range, we will get an overdetermined system. We can then check if the model I am proposing (or rather just repeating based on what a dev wrote) is sensible. In practice, explorers (and most other people) only care about the largest A class FSD the ship can hold, so we only need to worry about reverse engineering the formula for that case, for each ship.
---
Incidentally, have you noticed how the error your FSD gives when you try to jump too far is "maximum fuel usage exceeeded" or something? The above formula is why that error has that odd-sounding phrasing. You exceeded the left hand side.