← All tool references

Education · execute

Weighted Grade Calculator

Calculate a weighted course average with editable categories, contribution points, total-weight validation, and a letter-grade estimate.

Open public tool

Overview

Category
Education
API mode
execute
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/weighted-grade-calculator

View this descriptor as JSON

Execute availability

This tool has an execute route defined by its descriptor. Server-side execution is currently unavailable, so requests return api_not_launched.

POST /api/v1/tools/weighted-grade-calculator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

components · string · required
Lines formatted as name|score|weight.
{
    "type": "object",
    "properties": {
        "components": {
            "type": "string",
            "description": "Lines formatted as name|score|weight."
        }
    },
    "required": [
        "components"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

final_grade · number
Normalized weighted average.
letter_grade · string
Estimated A–F letter.
total_weight · number
Weight sum.
weighted_points · number
Points toward a 100% course.
normalized · boolean
Whether weights total 100%.
categories · array
Contribution rows.
{
    "type": "object",
    "properties": {
        "final_grade": {
            "type": "number",
            "description": "Normalized weighted average."
        },
        "letter_grade": {
            "type": "string",
            "description": "Estimated A–F letter."
        },
        "total_weight": {
            "type": "number",
            "description": "Weight sum."
        },
        "weighted_points": {
            "type": "number",
            "description": "Points toward a 100% course."
        },
        "normalized": {
            "type": "boolean",
            "description": "Whether weights total 100%."
        },
        "categories": {
            "type": "array",
            "description": "Contribution rows.",
            "items": {
                "type": "object"
            }
        }
    },
    "additionalProperties": false
}

Homework and exams

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/weighted-grade-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "components": "Homework|90|20\nExams|80|80"
}'
{
    "ok": true,
    "data": {
        "slug": "weighted-grade-calculator",
        "result": {
            "values": {
                "final_grade": 82,
                "letter_grade": "B",
                "total_weight": 100,
                "weighted_points": 82,
                "normalized": true,
                "categories": [
                    {
                        "name": "Homework",
                        "score": 90,
                        "weight": 20,
                        "contribution": 18
                    },
                    {
                        "name": "Exams",
                        "score": 80,
                        "weight": 80,
                        "contribution": 64
                    }
                ]
            },
            "display": {
                "display": "82"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.