current output calculation