In my case I'm using currencies but this could apply to many situations.
In my webapp a user is asked to define a currency distribution that (ideally) adds up to 100%. I present the currencies and the user defines the values in each. Currently I just have a simple number input box for each currency and the user types it in:
There must be a better, more visual way of doing this that perhaps also makes it easy to give a total value of 100%. Sliders perhaps?