# Trigonometry Calculator

> Evaluates the six trigonometric functions of an angle given in degrees or radians, with the reference angle and quadrant, and/or the inverse function (arcsin, arccos, arctan) of a value, returning the angle in degrees and radians.

- Calculator id: `trigonometry` · Category: Math (`math`) · Tool name: `calculate_trigonometric_functions`
- Canonical page: https://tttkmbb.com/math/trigonometry · This document: https://tttkmbb.com/math/trigonometry.md · JSON definition: https://tttkmbb.com/math/trigonometry.json

## Purpose

Evaluates the six trigonometric functions of an angle given in degrees or radians, with the reference angle and quadrant, and/or the inverse function (arcsin, arccos, arctan) of a value, returning the angle in degrees and radians.

**Use when:** You need sin, cos, tan or their reciprocals for an angle, the angle whose sine/cosine/tangent is a given value, or the reference angle and quadrant of an angle.

**Do not use when:** You want to solve a triangle from sides and angles (use right-triangle or triangle-solver) or only convert an angle between units (use angle).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `angle` | number |  | optional | Angle to evaluate the forward functions at. Omit when only an inverse function is needed. (min -1000000000, max 1000000000) |
| `unit` | enum: degrees \| radians |  | optional, default "degrees" | Unit of the angle input. |
| `value` | number |  | optional | Number whose arcsin, arccos or arctan is wanted (between −1 and 1 for arcsin/arccos). |
| `inverse_function` | enum: arcsin \| arccos \| arctan |  | optional, default "arcsin" | Which inverse function to apply to value. |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `angle_degrees` | number | ° | The input angle in degrees. |
| `angle_radians` | number | rad | The input angle in radians. |
| `normalized_degrees` | number | ° | The equivalent angle in [0°, 360°). |
| `reference_angle_degrees` | number | ° | Acute angle between the terminal side and the x-axis (0°–90°). |
| `quadrant` | string |  | Quadrant I–IV of the terminal side, or the axis it lies on. |
| `sin` | number |  | Sine of the angle. |
| `cos` | number |  | Cosine of the angle. |
| `tan` | number |  | Tangent sin/cos; the string 'undefined' at 90° + k·180°. |
| `sec` | number |  | Secant 1/cos; 'undefined' where cos = 0. |
| `csc` | number |  | Cosecant 1/sin; 'undefined' where sin = 0. |
| `cot` | number |  | Cotangent cos/sin; 'undefined' where sin = 0. |
| `inverse_angle_degrees` | number | ° | inverse_function(value) in degrees: arcsin in [−90°, 90°], arccos in [0°, 180°], arctan in (−90°, 90°). Only when value is given. |
| `inverse_angle_radians` | number | rad | The same principal value in radians. |
| `inverse_expression` | string |  | e.g. 'arcsin(0.5) = 30°'. |

## Formula

`θ_rad = θ_deg × π/180; tan = sin/cos, sec = 1/cos, csc = 1/sin, cot = cos/sin; reference angle = acute angle to the x-axis; arcsin, arccos, arctan return principal values`

Angles that are whole degrees are evaluated exactly at the axes (sin 180° = 0, cos 90° = 0) so that the reciprocal functions report 'undefined' instead of a huge number; other values come from IEEE double arithmetic and are rounded to 6 decimals.

## Data Sources

- NIST Digital Library of Mathematical Functions §4.14 – Trigonometric functions: definitions and periodicity — https://dlmf.nist.gov/4.14 (standard, retrieved 2026-09-24)
- NIST Digital Library of Mathematical Functions §4.23 – Inverse trigonometric functions: definitions — https://dlmf.nist.gov/4.23 (standard, retrieved 2026-09-24)
- Wikipedia – Trigonometric functions — https://en.wikipedia.org/wiki/Trigonometric_functions (reference, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/trigonometry?`
- `POST https://tttkmbb.com/api/v1/calculate/trigonometry` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/trigonometry · OpenAPI operationId `calculate_trigonometric_functions` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "trigonometry", "inputs": {…}}`

## Example

- 30° and arcsin 0.5: inputs `{"angle":30,"unit":"degrees","value":0.5,"inverse_function":"arcsin"}` → `{"angle_degrees":30,"angle_radians":0.523599,"normalized_degrees":30,"reference_angle_degrees":30,"quadrant":"Quadrant I","sin":0.5,"cos":0.866025,"tan":0.57735,"sec":1.154701,"csc":2,"cot":1.732051,"inverse_angle_degrees":30,"inverse_angle_radians":0.523599,"inverse_expression":"arcsin(0.5) = 30°"}`
- 90°: inputs `{"angle":90}` → `{"sin":1,"cos":0,"tan":"undefined","sec":"undefined","csc":1,"cot":0,"reference_angle_degrees":90,"quadrant":"on the positive y-axis (90°)","angle_radians":1.570796}`

```
GET https://tttkmbb.com/api/v1/calculate/trigonometry?angle=30&unit=degrees&value=0.5&inverse_function=arcsin
```

## Limitations

You want to solve a triangle from sides and angles (use right-triangle or triangle-solver) or only convert an angle between units (use angle). Angles that are whole degrees are evaluated exactly at the axes (sin 180° = 0, cos 90° = 0) so that the reciprocal functions report 'undefined' instead of a huge number; other values come from IEEE double arithmetic and are rounded to 6 decimals. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Why is tan 90° 'undefined' rather than a large number?**

cos 90° is exactly 0, so tan = sin/cos has no value; the function has a vertical asymptote there. A plain calculator prints ~1.6 × 10^16 only because π/2 cannot be represented exactly.

**Which value does arcsin return?**

The principal value between −90° and 90°. Since sin is periodic, 30° and 150° both have sine 0.5; the second solution of sin x = v is 180° − arcsin v.

**What is the reference angle for?**

It is the acute angle whose function values equal those of the original angle up to sign, e.g. sin 150° = sin 30° and cos 150° = −cos 30°.

## Related

- [Angle Converter](https://tttkmbb.com/conversion/angle.md) — Convert between degrees, radians, gradians and turns.
- [Right Triangle Calculator](https://tttkmbb.com/geometry/right-triangle.md) — Apply the ratios to the sides of a right triangle.
- [Triangle Solver](https://tttkmbb.com/geometry/triangle-solver.md) — Law of sines and cosines for general triangles.
