Grade calculator
Enter scores with their weights to get the weighted average, such as 80 and 90 at equal weight giving 85, or switch to the final exam option to see the score you still need for your target grade. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Calculation mode
- Weighted average
- Average
- 85
- Total weight
- 2
- Items counted
- 2
weighted average free online
Two questions: where you stand and what you still need
Most grade questions come in two kinds. The first is your current standing: each quiz, assignment or exam has a score and a weight, and the weighted average multiplies each score by its weight, adds the results and divides by the total weight. Two items of 80 and 90 with equal weight average 85. The second is planning: given the overall grade you want and how much the final exam counts, what must you score on it? The calculator solves that equation and shows your current average alongside.
Weights and the usual mistakes
Weights are relative, so you can enter percentages, points or simple multipliers as long as you use the same kind throughout. A common slip is averaging scores without their weights, which gives a small quiz the same pull as a big exam. Another is forgetting that the weight of the final is added to the weights already entered when the needed score is worked out. Each weight must be above zero, and a list can hold up to 50 items.
Items, weights and validation
In average mode the items array must contain 1 to 50 entries, and a total weight of zero raises a division-by-zero error. Any malformed item, missing required field or out-of-range value fails cleanly before or during the sum, never as an untyped crash.
What you can do with it
Course grade tracking
Combine quizzes, homework and exams with their weights into one running weighted average.
FAQ
How is the weighted average computed?
Sum of each score times its weight, divided by the total of the weights; weights must be greater than zero.
What score do I need on my final exam to reach a target grade?
Choose the final exam option, enter the overall grade you want, the weight of the final and the grades you already have. The calculator solves for the score the final must bring, and also shows your current average.
Do the weights have to add up to 100?
No. The sum of each score times its weight is divided by the total of the weights you enter, so weights of 1 and 1 give the same average as 50 and 50.
Can a weight be zero?
No. Every weight must be greater than zero, and a zero or negative weight is rejected. Scores can be any number up to a million in size, positive or negative.
How many graded items can I enter?
From 1 to 50 in the average option. For the final exam option the list of grades already earned is optional, so you can also start with only your target and the weight of the final.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/dev/grade-calculator \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"mode":"average"}'const res = await fetch("https://api.kit.forhosting.com/dev/grade-calculator", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"mode": "average"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/dev/grade-calculator",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"mode": "average"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/dev/grade-calculator", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"mode":"average"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"mode":"average"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/dev/grade-calculator", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"mode": "average"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "dev.grade_calculator",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Computes a weighted average of scored items, or in final_needed mode the score you must earn on a weighted final exam to reach a desired overall grade.
Two modes selected by the mode field
In average mode it takes an items array of 1 to 50 entries, each an object with a numeric score and a positive weight, and returns the weighted mean: the sum of score times weight divided by the total weight. The example — two items of 80 and 90 at weight 1 in average mode — returns an average of 85. dev.grade_calculator branches on a required mode field. The response includes average, total_weight and items_count. In final_needed mode you supply a desired overall grade and the final_weight of the remaining exam, plus an optional items array of grades already earned; it solves for the score you must get on that final. The formula is (desired * (sum_of_weights + final_weight) - sum_of_score_times_weight) / final_weight, and the response returns desired, final_weight, needed and current_average.
Items, weights and validation
Every item is validated: score must be a finite number whose absolute value does not exceed 1e6, and weight must be a finite number strictly greater than zero, so a zero or negative weight is rejected with a typed invalid_input error. In final_needed mode items is optional — an omitted list and an empty array are treated identically, since a declarative form drops empty optional lists — so with no prior grades the needed score is simply the desired grade. desired must be finite and final_weight must be finite and greater than zero.
Rounding, current_average and planning
A needed value above the maximum a final can award tells you the target is out of reach; a negative needed means the target is already secured. In final_needed mode the response also carries current_average: the weighted average of the grades already entered, or null when no prior items were supplied, so a student sees both where they stand and what the final requires.
Integration use cases
Final exam planning
Use final_needed to tell a student the exact score required on the final to reach a target grade.
Gradebook automation
Call the API per student to append a weighted average or needed-score column across a class.
Technical questions
What is the difference between the two modes?
average returns the weighted mean of your items; final_needed solves for the score required on a weighted final to hit a desired overall grade.
Do I need prior grades for final_needed mode?
No. items is optional there; with no prior grades the needed score equals the desired grade and current_average is null.
How is rounding controlled?
The decimals field (0 to 4, default 2) rounds results half-up from the raw value, not via toFixed.
What triggers an error?
A non-positive weight, a total weight of zero, an out-of-range score or a missing required field returns invalid_input. API from $0.002.