calculating bang value