← All tool references

Math · not_available

Surface Area Calculator

Calculate surface area and volume for a cube, rectangular prism, cylinder, sphere, or cone.

Open public tool

Overview

Category
Math
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/surface-area-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/surface-area-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.

solid · string · required
Choose the solid that matches the calculation. Accepted values: cube, rectangular_prism, cylinder, sphere, cone.
length · number · required
Enter the length or side used in the calculation.
width · number · required
Enter the width used in the calculation.
height · number · required
Enter the height used in the calculation.
radius · number · required
Enter the radius used in the calculation.
{
    "type": "object",
    "properties": {
        "solid": {
            "type": "string",
            "description": "Choose the solid that matches the calculation.",
            "enum": [
                "cube",
                "rectangular_prism",
                "cylinder",
                "sphere",
                "cone"
            ]
        },
        "length": {
            "type": "number",
            "description": "Enter the length or side used in the calculation.",
            "minimum": 0
        },
        "width": {
            "type": "number",
            "description": "Enter the width used in the calculation.",
            "minimum": 0
        },
        "height": {
            "type": "number",
            "description": "Enter the height used in the calculation.",
            "minimum": 0
        },
        "radius": {
            "type": "number",
            "description": "Enter the radius used in the calculation.",
            "minimum": 0
        }
    },
    "required": [
        "solid",
        "length",
        "width",
        "height",
        "radius"
    ],
    "additionalProperties": false
}

Output schema

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

surface_area · number
Total surface area produced by the calculation.
volume · number
Volume produced by the calculation.
formula · string
Formula used produced by the calculation.
{
    "type": "object",
    "properties": {
        "surface_area": {
            "type": "number",
            "description": "Total surface area produced by the calculation."
        },
        "volume": {
            "type": "number",
            "description": "Volume produced by the calculation."
        },
        "formula": {
            "type": "string",
            "description": "Formula used produced by the calculation."
        }
    },
    "additionalProperties": false
}

Surface Area Calculator 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/surface-area-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "solid": "rectangular_prism",
    "length": 10,
    "width": 6,
    "height": 4,
    "radius": 3
}'
{
    "ok": true,
    "data": {
        "slug": "surface-area-calculator",
        "result": {
            "values": {
                "surface_area": 248,
                "volume": 240,
                "formula": "SA = 2(lw+lh+wh); V = lwh"
            },
            "display": {
                "display": "248"
            },
            "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.