--- title: "Weighted Average" slug: "weighted-average" updated: 2024-10-23T13:47:07Z published: 2024-10-23T13:47:07Z canonical: "learn.servitly.com/weighted-average" --- > ## Documentation Index > Fetch the complete documentation index at: https://learn.servitly.com/llms.txt > Use this file to discover all available pages before exploring further. # Weighted Average This Algorithm calculates the weighted average given the input metrics and weights. ![](https://cdn.document360.io/6759e9c9-3ce3-49df-965a-7231d2d9a10a/Images/Documentation/image(166).png?sv=2026-02-06&spr=https&st=2026-10-16T17%3A31%3A24Z&se=2026-10-16T18%3A31%3A24Z&sr=c&sp=r&sig=ngNR6810pHk%2BI%2FI00HYSLezI4hsPov62yCnY8a0ueRc%3D) Each input value is multiplied by its respective weight, the products are then summed and divided by the sum of the weights. Mathematically, it can be represented as: ```plaintext (M1 x W1 + M2 x W2 + ... + Mn x Wn) / (W1 + W2 + ... + Wn) ``` ## Inputs Here is the list of inputs required by this Algorithm. | | INPUTS | | --- | --- | | *Metrics* | The metrics and weights on which perform the weighted average. Type: KEY_VALUE **\|** Mandatory | ## Outputs Here is the list of outputs provided by this Algorithm. | | OUTPUTS | | --- | --- | | *Weighted Average* | The weighted average. Type: FLOAT | ## Insight Metric Configuration To use this Algorithm in an [Insight Metric](/docs/insight-metrics), you need to: 1. Go to the *Insight / Insight Metrics* page. 2. Select the *Thing Definitions* tab. 3. Select the Thing Definition where to create the insight metric. 4. Click the Add Metric button. 5. Select the *Weighted Average* algorithm. 6. Configure the required inputs.