I'm working on a calculator and it requires that there are four inputs where the max for each is 100 and the sum of all four is always equal to 100. The best way to accomplish this for good UX is when any slider is moved down the slider just before it moves up. If a slider is moved up the slider just after it moves down if is't not already at zero.
I have tried matching the input names and adding formulas. I really don't know the best way to approach this.