← All tool references

Education · not_available

Weighted Course Grade Calculator

Calculate a course grade from weighted assignments.

Open public tool

Overview

Category
Education
API mode
not_available
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-course-grade-calculator

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/weighted-course-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.

categories · string · required
Enter assignments.
{
    "type": "object",
    "properties": {
        "categories": {
            "type": "string",
            "description": "Enter assignments."
        }
    },
    "required": [
        "categories"
    ],
    "additionalProperties": false
}

Output schema

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

weighted_grade · number
Weighted course grade produced by the tool.
weight_total · number
Weight total produced by the tool.
categories · array
Weighted contributions produced by the tool.
letter_grade · string
Illustrative letter grade produced by the tool.
{
    "type": "object",
    "properties": {
        "weighted_grade": {
            "type": "number",
            "description": "Weighted course grade produced by the tool."
        },
        "weight_total": {
            "type": "number",
            "description": "Weight total produced by the tool."
        },
        "categories": {
            "type": "array",
            "description": "Weighted contributions produced by the tool."
        },
        "letter_grade": {
            "type": "string",
            "description": "Illustrative letter grade produced by the tool."
        }
    },
    "additionalProperties": false
}

Weighted Course Grade Calculator worked example

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-course-grade-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "categories": "Labs|94|20\nProjects|88|30\nExams|91|50"
}'
{
    "ok": true,
    "data": {
        "slug": "weighted-course-grade-calculator",
        "result": {
            "values": {
                "weighted_grade": 90.7000000000000028421709430404007434844970703125,
                "weight_total": 100,
                "categories": [
                    {
                        "category": "Labs",
                        "score": 94,
                        "weight": 20,
                        "contribution": 18.800000000000000710542735760100185871124267578125
                    },
                    {
                        "category": "Projects",
                        "score": 88,
                        "weight": 30,
                        "contribution": 26.39999999999999857891452847979962825775146484375
                    },
                    {
                        "category": "Exams",
                        "score": 91,
                        "weight": 50,
                        "contribution": 45.5
                    }
                ],
                "letter_grade": "A-"
            },
            "display": {
                "display": "90.7"
            },
            "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.