---
title: "Calculate what percentage one number is of another. Given a value and a total, returns the percentage, decimal form, and simplified fraction. For example, 3 out of 4 yields 75%, 0.75, and '3/4'. Commonly used for test scores, survey results, financial ratios, completion rates, and unit conversions. Chain with percentage_increase to compare successive measurements or use with test_grade for academic scoring."
method: POST
path: "/api/percentage_calc"
tags: ["general"]
---

# Calculate what percentage one number is of another. Given a value and a total, returns the percentage, decimal form, and simplified fraction. For example, 3 out of 4 yields 75%, 0.75, and '3/4'. Commonly used for test scores, survey results, financial ratios, completion rates, and unit conversions. Chain with percentage_increase to compare successive measurements or use with test_grade for academic scoring.

`POST /api/percentage_calc`

## Request

- Base URL: `https://calc.engineer`
- URL: `https://calc.engineer/api/percentage_calc`
- Auth: none declared

## Request body

- object
  - `value` number, required: The part or numerator value
  - `total` number, required: The whole or denominator value (must not be zero)

## Response `200`

Computed result for percentage_calc

- object
  - `result` object, required
    - `percentage` number, required: The percentage value (e.g. 75 for 75%)
    - `decimal` number, required: The decimal form (e.g. 0.75)
    - `fraction_simplified` string, required: Simplified fraction as a string (e.g. '3/4')
  - `tool` string, required
  - `version` string, required
  - `computed_at` string, date-time, required
  - `chain` object, required
    - `feeds` unknown[]
      - unknown
    - `accepts_from` unknown[]
      - unknown

## Other responses

- `400`: Validation error or invalid JSON
- `404`: Tool not found

---

[API](https://skmtc.dev/calc/apis/calc-engineer-api.md) · [All operations](https://skmtc.dev/calc/apis/calc-engineer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calc/apis/calc-engineer-api/revisions/8830480ec488?raw)
