How to Calculate a Weighted Average?

Weighted average is used when the values are different, we compare 2 sets of data. The formula is ((Variable 1 into Value 1)+ (Variable 2 into Value 2))/ (Value 1+ Value 2)