Scientific Calculator
Evaluate an expression with parentheses, powers, roots and scientific functions. Set DEG or RAD before trigonometry, then press =; inspect the expression and history alongside the answer.
Type expressions directly and press Enter. Examples: sin(30), sqrt(144), 6.02*10^23, log10(1000), fact(5), nCr(10,3).
Recent calculations
Your recent calculations will appear here.
Check syntax and units first
- DEG: sin(30) ≈ 0.5; RAD: sin(pi/6) ≈ 0.5.
- 2 + 3 * 4 = 14, while (2 + 3) * 4 = 20.
- log10(1000) = 3; log(e) = 1.
- nCr(10,3) = 120; nPr(10,3) = 720.
How to use the Scientific Calculator
- Type an expression or build it with the buttons, then press = (or Enter in the expression field).
- Select DEG for angles in degrees or RAD for radians. This setting affects the custom sin, cos, tan and inverse trig functions.
- Use ^ for powers, sqrt(x) for square roots, log10(x) for base-10 logarithms and log(x) for natural logarithms.
- Use parentheses to state grouping explicitly; compare 2 + 3 * 4 with (2 + 3) * 4.
- fact(n) accepts integers from 0 through 170; nCr(n,r) ignores order and nPr(n,r) counts order, requiring whole numbers with n ≥ r ≥ 0.
- The ans variable reuses the previous answer; inspect the expression after recalling memory or a prior result.
Expression syntax is part of the calculation
The parser uses ^ for exponentiation and conventional arithmetic grouping. Parentheses make intent visible when a pasted expression contains fractions, negative bases or a leading minus. Write (-3)^2 to square a negative base and -(3^2) to negate a square; the answers are 9 and −9.
The interface supplies its own DEG/RAD trig functions. Generic math.js examples use radians by default, so the library documentation alone does not describe the page's angle switch. For an inverse sine, asin(0.5) is approximately 30 in DEG and pi/6 in RAD.
A finite display can still lose information
JavaScript numbers have finite precision. Subtracting nearly equal values, repeating decimals and very large integers can lose digits. The calculator formats a numerical result, so extra printed decimals are not a guarantee of exact measurement or mathematical equality.
The custom factorial cap prevents inputs above 170, but it does not guarantee every derived nCr or nPr intermediate stays finite or exact. Invalid domains, division by zero, overflow or non-real results can produce errors. In particular, floating-point tan near 90° may show a very large finite value even though the exact tangent at 90° is undefined; use a known identity or inspect the domain before trusting that output.
Real-number output and angle domains
This is a finite real-number display using math.js and custom angle functions. Complex, infinite or invalid results are rejected. Floating-point tangent near 90° can be huge even though the exact tangent is undefined. Factorials and derived counts are not arbitrary-precision proofs.
Examples
Parentheses control a shared denominator
Enter (12 + 8)/(3 + 2). The numerator is 20 and denominator is 5, so the answer is 4. Without parentheses, 12 + 8/3 + 2 evaluates to about 16.666667; it represents a different expression.
An angle-mode check
In DEG, sin(30) gives approximately 0.5. In RAD, sin(pi/6) gives approximately 0.5 because pi radians is 180°. Entering sin(30) in RAD instead gives about −0.988032; changing the setting changes the units of the input, not the written digits.
Committee versus ordered positions
To choose 3 people from 10, nCr(10,3) = (10 × 9 × 8)/(3 × 2 × 1) = 120. If the three positions are distinct, nPr(10,3) = 10 × 9 × 8 = 720. Each group appears in 3! = 6 orders, and 120 × 6 = 720.
Check a logarithm by exponentiating
log10(1000) = 3 because 10^3 = 1000. For a natural logarithm, log(e) = 1 because e^1 = e. Use the explicit log10 name when a base-10 value is required.
Check the result in context
Angle switch: sin(30) in DEG is approximately 0.5; sin(pi/6) in RAD is also approximately 0.5. sqrt(81) + 2^3 gives 17.
Trigonometry of common angles
| Degrees | Radians | sin | cos | tan |
|---|---|---|---|---|
| 0° | 0 | 0 | 1 | 0 |
| 30° | 0.5236 | 0.5 | 0.866 | 0.5774 |
| 45° | 0.7854 | 0.7071 | 0.7071 | 1 |
| 60° | 1.0472 | 0.866 | 0.5 | 1.7321 |
| 90° | 1.5708 | 1 | 0 | undefined |
Frequently asked questions
Which logarithm should I type?
Use log10(x) for base 10 and log(x) for the natural logarithm. As checks, log10(1000) = 3 and log(e) = 1. Function names matter when copying an expression from another calculator.
Why do combinations and permutations differ?
A combination counts a group once. A permutation distinguishes orders. For n = 10 and r = 3, the counts are 120 and 720; the factor between them is 3! = 6.
Does DEG change every number in my expression?
No. It controls angle conversion in the custom trig and inverse trig functions. Ordinary arithmetic and logarithms are not converted to degrees.
How do I square a negative number without changing its meaning?
Enter (-3)^2 for 9. Enter -(3^2) for −9. Parentheses identify whether the minus belongs to the base or is applied after the power.
Sources & methodology
More math tools
Graphing Calculator
Graph functions, trace points, view tables and analyze equations.
Open tool →Logarithm Calculator
Calculate log base 10, natural log, base 2 or a custom logarithm base.
Open tool →Permutation Calculator
Calculate nPr permutations with or without repetition.
Open tool →Combination Calculator
Calculate nCr combinations with or without repetition.
Open tool →Fraction Calculator
Calculate and simplify fractions and mixed numbers with steps.
Open tool →Discount Calculator
Calculate sale price, savings, stacked discounts, reverse discounts and optional tax.
Open tool →