Any way to make a cell find a gain or loss

i am trying to figure out how to make the cell automatically figure out if I have made a gain or loss in money in a particular cell. Is there any way to make this happen?