Trig functions
At 30°, the sine is 0.5, the cosine √3/2 and the tangent 1/√3. Enter a single angle in degrees or radians and get all three values side by side, with the angle shown in both units. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Angle
- 30
- Degrees
- 30 degrees
- Radians
- 0.5235987756
- Sine
- 0.5
- Cosine
- 0.8660254038
Most programming libraries expose only radian arguments, so a heading written in degrees has to be converted first or every ratio comes out wrong. This page accepts one finite angle in degrees by default, or in radians when you say so, converts if needed, and returns all three primary trigonometric values together. Identities you can pin in tests include sine of thirty degrees equals one half, cosine of sixty degrees equals one half, and tangent of forty-five degrees equals one.
What a trig calculator returns and how degrees become radians
Trigonometry maps an angle to three signed ratios on the unit circle. Sine is the vertical coordinate of the point at that angle, cosine is the horizontal coordinate, and tangent is the slope of the ray, which is exactly sine divided by cosine whenever cosine is not zero.
When the angle is written in degrees, those three values are not the library functions of the raw number: every mainstream runtime implements the analytic sine, cosine, and tangent of a real argument in radians, so thirty must become pi over six before the series or the hardware instruction runs. Forgetting the conversion is the most common classroom bug — sine of thirty radians is about minus zero point nine eight eight, not one half.
This landing exists for the short search that says trig or trig calculator: convert if the unit is degrees, then evaluate all three primary functions. After conversion, sine and cosine always land in the closed interval from minus one to one; a result outside that interval is floating-point noise and this implementation clamps it.
Special angles have textbook exact values that students expect without a trail of nines: sine of thirty degrees is one half, cosine of sixty degrees is one half, tangent of forty-five degrees is one, and sine of zero degrees is zero with cosine one and tangent zero. Negative angles are legal and use oddness for sine and tangent and evenness for cosine.
Angles larger than a full turn remain valid; they are reduced modulo three hundred sixty degrees only when matching those special values, while the echoed input keeps the original measure. Related searches such as a six-function sine-cosine-tangent table that also emits cosecant, secant, and cotangent, a sine-only degrees calculator, or a tangent-only page that never returns sine, are different intents. Here the contract is the three primary values of one finite angle.
Where a three-function trig calculator earns its keep
Classrooms and tutoring platforms use a trig calculator so learners can check sine, cosine, and tangent of an arbitrary classroom angle in one shot without mixing degrees and radians or copying a calculator mode they cannot see. Exam generators need a deterministic oracle that marks non-finite tokens as invalid instead of silently returning NaN, which many language runtimes do and which a buggy grader might treat as a number. Failed validation does not consume balance.
Keep requests small, pin the rounded triple in tests, and you get reproducible sine, cosine, and tangent for homework, LMS plugins, and edge workers without standing up symbolic math infrastructure of your own.
Related searches such as inverse sine in degrees, a unit-circle explorer, a hyperbolic tangent, or a full six-function table that also names cosecant, are different problems and are served by other pages; this contract stays on the three primary functions of one finite angle so the landing matches what a student actually types when the question is simply trig of this many degrees or radians.
What you can do with it
Classroom and homework checks
Let students submit one angle in degrees or radians and verify sine, cosine, and tangent together, including the identities sin(30°)=1/2, tan(45°)=1, and sin(0°)=0.
Exam and LMS auto-grading
Mark trig items with a deterministic oracle that rejects non-finite angles and odd multiples of 90°, and never invents NaN as a successful triple.
Headings, sprites, and resolved components
Convert a degree or radian heading into opposite, adjacent, and slope ratios in robotics, surveying, or game scripts without importing a full computer-algebra library.
FAQ
Does the trig calculator accept degrees and radians?
Yes. Degrees is the default. Set unit to radians when the measure is already in radians. Library sine, cosine, and tangent are always evaluated on a radian argument after conversion.
What happens if the angle is not a finite number?
Missing fields, empty strings, non-numeric text, NaN, and Infinity are rejected and are not billed.
Why is 90° rejected while 0° is accepted?
Tangent is undefined at odd multiples of 90° because cosine is zero. At 0°, sine is 0, cosine is 1, and tangent is 0, so all three primary functions are defined.
What are the sine, cosine and tangent of 30 degrees?
The sine of 30° is exactly 1/2, the cosine is √3/2 and the tangent is 1/√3. Enter 30 with degrees selected and the calculator shows all three at once, together with the same angle in radians.
Does it also give cosecant, secant and cotangent?
No. It returns only the three primary values: sine, cosine and tangent. That is also why 0° is accepted here, since none of these three breaks down at zero, while cosecant and cotangent would.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/math/trig \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"angle":30}'const res = await fetch("https://api.kit.forhosting.com/math/trig", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"angle": 30
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/trig",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"angle": 30
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/trig", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"angle":30}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"angle":30}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/trig", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"angle": 30
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.trig",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_abs_angle | 1000000000000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
A trig calculator answers the three questions a student, surveyor, or graphics programmer asks of a single angle: what is its sine, what is its cosine, and what is its tangent. Non-finite tokens such as NaN and Infinity fail with invalid_input so a homework script never treats a missing result as a successful zero.
Input contract, response shape, and error behaviour
Unit values outside the closed set degrees or radians fail the same way. Zero degrees is accepted: sine is zero, cosine is one, and tangent is zero. That is a product difference from a six-function calculator that must refuse zero because cosecant and cotangent blow up. On success the body echoes the cleaned angle and the resolved unit, returns degrees and radians for both measures, and returns sine, cosine, and tangent as the three primary results. Example: angle thirty in degrees yields sine one half, cosine root three over two, and tangent one over root three. Example: angle zero yields sine zero, cosine one, tangent zero. POST a JSON body with the required field angle, a finite real number. The field may arrive as a JSON number or as a numeric string in decimal or scientific notation; aliases theta, x, and value are accepted when angle is omitted. An optional unit field selects degrees, the default, or radians; aliases angle_unit and mode are accepted. Missing fields, empty strings, non-numeric text, NaN, and Infinity fail with invalid_input naming the field and are not billed. Tangent is undefined at odd multiples of ninety degrees because cosine is zero there — ninety, two hundred seventy, minus ninety, pi over two, three pi over two, and the same family — so those angles fail with invalid_input rather than returning Infinity, which JSON cannot represent. A formula string restates sin of theta, cos of theta, and tan of theta equals sin over cos; a compact expression such as sin(30°), cos(30°), tan(30°); and a one-line message complete the payload. Pair the payload with your own labels; this endpoint does not emit plots, reciprocal functions, or a step-by-step lesson beyond the formula field.
Where a three-function trig calculator earns its keep
Surveying, robotics, and game scripts store headings in degrees and still need the opposite-over-hypotenuse, adjacent-over-hypotenuse, and opposite-over-adjacent ratios for a rise, a sprite offset, or a resolved force; calling a tiny parse API avoids pulling a computer-algebra system for one conversion and three evaluations.
Technical questions
How do I compute sine, cosine, and tangent of an angle?
Send a finite number in the field angle (aliases theta, x, value) and optionally unit as degrees (default) or radians. The API returns sine, cosine, and tangent together.
What does the trig calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.