{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"weighted-average"},"result":{"entity_type":"calculator","id":"weighted-average","calculator_id":"weighted-average","canonical_url":"https://tttkmbb.com/statistics/weighted-average","name":"Weighted Average Calculator","title":"Weighted Average Calculator – Weighted Mean of Values with Given Weights","category":"statistics","category_name":"Statistics & Probability","tool_name":"calculate_weighted_average","featured_mcp_tool":false,"description":"Computes the weighted arithmetic mean Σ(w·x) / Σw of a list of values and a matching list of weights, along with the total weight and the unweighted mean for comparison.","use_when":"Values contribute unequally to an average: course grades with credit weights, portfolio returns by allocation, survey answers with sampling weights, average price over different quantities.","do_not_use_when":"All items count equally (use descriptive-statistics for the plain mean), or the weights are probabilities of outcomes (use expected-value, which also gives the variance).","inputs":[{"name":"values","label":"Values","type":"number_list","required":true,"description":"The values to average.","example":[90,80,70]},{"name":"weights","label":"Weights","type":"number_list","required":true,"description":"Non-negative weight for each value, in the same order (percentages, credits, quantities); they need not sum to 1.","example":[0.5,0.3,0.2]}],"outputs":[{"name":"weighted_average","label":"Weighted average","type":"number","decimals":4,"description":"Σ(values × weights) / Σweights."},{"name":"total_weight","label":"Total weight","type":"number","decimals":4,"description":"Sum of the weights."},{"name":"weighted_sum","label":"Weighted sum","type":"number","decimals":4,"description":"Σ(values × weights) before dividing by the total weight."},{"name":"simple_average","label":"Unweighted mean","type":"number","decimals":4,"description":"Plain arithmetic mean of the values, for comparison."},{"name":"count","label":"Number of items","type":"integer","decimals":4,"description":"Number of value/weight pairs."}],"input_schema":{"type":"object","properties":{"values":{"description":"The values to average.","type":"array","items":{"type":"number"},"minItems":1,"examples":[[90,80,70]]},"weights":{"description":"Non-negative weight for each value, in the same order (percentages, credits, quantities); they need not sum to 1.","type":"array","items":{"type":"number"},"minItems":1,"examples":[[0.5,0.3,0.2]]}},"additionalProperties":false,"required":["values","weights"]},"output_schema":{"type":"object","properties":{"weighted_average":{"description":"Σ(values × weights) / Σweights.","type":"number"},"total_weight":{"description":"Sum of the weights.","type":"number"},"weighted_sum":{"description":"Σ(values × weights) before dividing by the total weight.","type":"number"},"simple_average":{"description":"Plain arithmetic mean of the values, for comparison.","type":"number"},"count":{"description":"Number of value/weight pairs.","type":"integer"}}},"formula":"weighted_average = Σ(values_i × weights_i) / Σ weights_i","sources":[{"name":"Wikipedia – Weighted arithmetic mean","url":"https://en.wikipedia.org/wiki/Weighted_arithmetic_mean","type":"reference","retrieved_at":"2026-09-23"},{"name":"NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.5.1 Measures of Location","url":"https://www.itl.nist.gov/div898/handbook/eda/section3/eda351.htm","type":"government","retrieved_at":"2026-09-23"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"Grades 90, 80, 70 weighted 50/30/20 %","inputs":{"values":[90,80,70],"weights":[0.5,0.3,0.2]},"expected":{"weighted_average":83,"total_weight":1,"weighted_sum":83,"simple_average":80,"count":3},"url":"https://tttkmbb.com/api/v1/calculate/weighted-average?values=90%2C80%2C70&weights=0.5%2C0.3%2C0.2"},{"name":"4, 8, 15 with weights 2, 1, 1","inputs":{"values":[4,8,15],"weights":[2,1,1]},"expected":{"weighted_average":7.75,"total_weight":4,"weighted_sum":31,"simple_average":9},"url":"https://tttkmbb.com/api/v1/calculate/weighted-average?values=4%2C8%2C15&weights=2%2C1%2C1"}],"faq":[{"q":"Do the weights have to add up to 1 or 100?","a":"No. The result is divided by the total weight, so 50/30/20, 5/3/2 and 0.5/0.3/0.2 all give the same average."},{"q":"What if a weight is zero?","a":"That value is ignored. At least one weight must be positive; negative weights are rejected."}],"tags":["weighted average","weighted mean","grade average with weights","weighted score"],"related":[{"calculator_id":"descriptive-statistics","reason":"Unweighted mean, median and spread of a list."},{"calculator_id":"expected-value","reason":"Probability-weighted mean and variance of outcomes."},{"calculator_id":"gpa","reason":"Credit-weighted grade point average."}],"links":{"html":"https://tttkmbb.com/statistics/weighted-average","markdown":"https://tttkmbb.com/statistics/weighted-average.md","json":"https://tttkmbb.com/statistics/weighted-average.json","api":"https://tttkmbb.com/api/v1/calculate/weighted-average","schema":"https://tttkmbb.com/api/v1/calculators/weighted-average","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-23"},"timestamp":"2026-09-23T23:23:49Z"}