How to use the calculator
Open the calculator, type an expression, then choose Calculate or press Enter. The buttons insert the same visible syntax at your cursor. Shift+Enter inserts a new line; normal browser shortcuts stay available.
Write an expression
Use a decimal point, explicit multiplication (* or ×) and balanced parentheses. A comma separates function arguments, so log(8,2) means a base-2 logarithm. Write 2*(3+4), not 2(3+4). EXP inserts e for decimal exponent input: 1e-4 is 0.0001. The standalone constant e is Euler’s number.
| Expression | Result and reason |
|---|---|
2+3*4 | 14; multiplication comes first |
(2+3)*4 | 20; parentheses come first |
-2^2 | −4; power before unary minus |
(-2)^2 | 4 |
2^3^2 | 512; powers group from the right |
2^-3 | 0.125 |
8/2*2 | 8; division and multiplication run left to right |
Percentages
A percentage normally divides by 100. After + or −, a right-hand percentage applies to the left-hand subtotal: 200+10% is 220, 200-10% is 180, and 200*10% is 20. In 200+10%+10%, the second increase applies to 220, giving 242.
Percentages with parentheses and powers
The relative rule applies when the outermost operation on the right is a percentage, ignoring surrounding parentheses and unary signs. 200+(5+5)% is 220, and 200+(-10%) is 180. A compound term without an outer percentage uses its normal value: 200+(10%*2) is 200.2.
The same rule applies inside parentheses. In 200+(10%+10%), the inner sum is 0.11, so the answer is 200.11. 10%+200 is 200.1.
2^3% means 2^(3%). For eight percent, write (2^3)%, giving 0.08. Chained postfix operators such as 10%% or 10!% are refused; write (10!)% when that is intended. Use mod(a,b) for a remainder, not %.
Scientific functions
Scientific is the starting panel. On narrow screens, open the named function groups below the ordinary keys. DEG starts in degrees; RAD uses radians. Inverse trig results follow the selected angle mode. Hyperbolic functions do not depend on that choice.
| Functions | Syntax or example |
|---|---|
| Powers and roots | x^2, x^3, x^y, sqrt(x), cbrt(x), nthRoot(x,n), 1/x, 10^x, exp(x) |
| Logarithms | ln(e), log(100) or log10(100), log2(8), log(8,2) |
| Trigonometry | sin(x), cos(x), tan(x), asin(x), acos(x), atan(x) |
| Hyperbolic | sinh(x), cosh(x), tanh(x), asinh(x), acosh(x), atanh(x) |
| Rounding and magnitude | abs(x), floor(x), ceil(x), round(x); round sends halves away from zero |
| Combinations and remainder | n!, nCr(n,r), nPr(n,r), mod(a,b); the remainder is nonnegative and requires b > 0 |
| Constants and reuse | pi or π, e, Ans, M |
Real is the starting domain. Division by zero and real logarithms of nonpositive values give errors. In Real, a negative square root gives an error unless its operand is explicitly Complex. Choose Complex for implicit complex square roots and powers, or write sqrt(complex(-1,0)). For an odd root of a negative number, use cbrt(-8) or nthRoot(-8,3). Complex powers use the principal branch. Scientific logarithms, trigonometric and hyperbolic functions still accept only real operands. 0^0 is refused.
Function and input limits
Expressions can contain up to 16384 characters, 8192 tokens, 4096 nodes, and 32 nested levels. Exact rational numerators and denominators are limited to 16384 bits; overly large intermediate operations fail rather than switching silently to approximation. Standard decimal inputs can have up to 64 significant digits; decimal exponents must be from −10000 to 10000. Intermediate values have the same exponent limit. Power exponents have absolute value at most 10,000, except for trivial bases 0 and ±1 where the result permits it. exp, sinh, cosh, tanh, asinh and acosh accept arguments with absolute value at most 10,000. Other expensive operations may return a range or precision message.
Factorial accepts integers from 0 to 1000. Combinations and permutations require integers with 0 ≤ r ≤ n ≤ 1000. Root indices must be nonzero integers with absolute value at most 1000. A negative radicand needs an odd index. mod requires a positive divisor; if precision would round a tiny negative remainder up to the divisor, it returns a precision message instead of an invalid remainder. asin and acos require −1 to 1; acosh requires at least 1; atanh requires a value strictly between −1 and 1.
Forward trigonometry in RAD is limited to |x| ≤ 1,000,000. DEG values are reduced before conversion. Exact tangent poles such as 90° give a domain error. For other tangent inputs, an absolute cosine at or below 1e−40 gives a precision message: the value may be mathematically valid but cannot be calculated reliably within this model. Tiny nonzero sine values are not rounded to zero as a general rule.
A calculation that exceeds 500 ms is cancelled in its Worker. Editing the expression or angle cancels pending work. The first Worker startup has a separate 5-second limit.
Arithmetic and exact fractions
Calculator opens in Standard. Tools, Equations, Data and Programmer first open in Exact fractions; Find a root always uses Standard; each keeps its arithmetic choice while this page is open. Standard uses 64 significant decimal working digits. Exact fractions reads integer, finite decimal and repeating decimal text directly as rational numbers: 1/3+1/6 = 1/2 and 0.1(6) = 1/6. Exact arithmetic does not measure uncertainty or guarantee the accuracy of your source data.
exact(expression) explicitly evaluates exact arithmetic; approx(expression) explicitly uses Standard. π, e, transcendental functions and non-perfect roots produce numerical approximations. An operation involving an approximation stays approximate. exact(Ans) cannot recover the original fraction from an approximate answer. Convert stored decimal to fraction uses storedFraction(value): it converts the actual stored finite decimal, with the label “Fraction of stored approximation”.
Fraction, Mixed and Decimal change how the same rational result is shown. Repeating digits are in parentheses; a long period may be visibly truncated. Copy result copies the selected full visible representation and is unavailable for truncated output. Copy value writes the full typed expression, such as exact(1/3), approx(0.3333333333333333), exact(230)*cm or word(exact(255),8,unsigned). Copied constructors may include withMetadata(...) to retain stored-decimal and measured-constant labels. Ans and M retain the full typed value. Working-digit and display precision do not alter it.
Tools: formulas and examples
Choose Tools, then search the local task list. Each form uses the same engine as Expression. Percent fields take 10 for 10%, without a percent sign. Lists take one value per line; matching value/weight lists need the same number of rows. No external rates or calculation service are used.
Exact arithmetic / big integers
a+b, a-b, a*b, a/b, a^n
1/3+1/6 = 1/2
Exact fractions reads decimal and integer text without intermediate rounding. Transcendental functions and non-perfect roots produce an approximation.
Mixed / improper fractions
sign*mixed(whole,numerator,denominator); numerator/denominator
−1 1/2 = −3/2; 7/3 = 2 1/3
The separate sign applies to the entire mixed number, including a zero whole part. For mixed input use a nonnegative proper numerator and a positive denominator.
Decimals / fractions
0.1(6), 0.(3), numerator/denominator
0.1(6) = 1/6
Parentheses mark repeating decimal digits. Fraction-to-decimal preserves the exact ratio; a truncated display is explicitly labelled.
Compare / bound numbers
sign(value), min(values...), max(values...), clamp(value,lower,upper)
clamp(12,0,10) = 10
Sign uses one value. Minimum and maximum need 2–50 values. Clamp needs a lower bound no greater than its upper bound.
Powers / roots
base^exponent, sqrt(value), cbrt(value), nthRoot(value,index)
2^10 = 1024; nthRoot(-8,3) = −2
Power and root operations have different real domains. An n-th-root index is a nonzero integer with absolute value at most 1000.
Logarithms
ln(value), log10(value), log2(value), log(value,base)
log(8,2) = 3
Real logarithms require a positive value. A custom base must be positive and different from 1.
Trigonometry
sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh
sin(30) = 0.5 in DEG
Ordinary trig uses DEG/RAD; inverse trig returns that angle. Hyperbolic functions use dimensionless real input. Explicit angle units override DEG/RAD where supported.
Combinations / permutations
nCr(n,r), nPr(n,r), n!
nCr(10,3) = 120
Use integers with 0 ≤ r ≤ n ≤ 1000; factorial needs only n in 0–1000. Order matters for permutations and not for combinations.
Complex numbers & roots
complex(a,b), i, re(z), im(z), conj(z), abs(z), arg(z), roots(z,n)
(1+2*i)*(3-4*i) = 11+2*i; roots(1,4) gives 1, i, −1, −i
Use explicit multiplication: 2*i. Real is the default; choose Complex for implicit complex square roots and powers. Arg is in (−π, π], with a branch cut on the negative real axis. Principal roots and all roots are distinct. Use the result’s Show complex as control for Cartesian, polar or exponential presentation.
Polar → complex value
polar(radius,angle)
polar(2,90*deg) = 2*i
A bare angle uses this task’s DEG/RAD setting; explicit deg/rad units override it. Exponential result text always names radians. Presentation changes preserve the Cartesian stored value.
Vectors & products
vec(a,b,...), norm(v), normalize(v), dot(u,v), cross(u,v), angle(u,v), project(u,v)
norm(vec(3,4)) = 5; dot(vec(i),vec(i)) = 1
1–50 components; newlines or semicolons separate rows. Dot conjugates the first vector. Cross requires three components. Angle requires real, nonzero vectors. Components share compatible linear units; even zero needs its explicit unit.
Matrix operations
mat(vec(...),...), A*B, A^k, transpose(A), adjoint(A), det(A), trace(A), inv(A), rank(A), rref(A)
det(mat(vec(1,2),vec(3,4))) = −2
Up to 10 × 10. Tabs separate columns and newlines rows; blank cells and ragged rows are errors. Transpose swaps axes; adjoint also conjugates. Exact elimination preserves exact rank. Numerical rank/RREF are estimates under reported tolerances. Matrix division and broadcasting are unavailable.
Linear equation
a*x+b = 0
2*x−4 = 0 → x = 2
Dimensionless real coefficients. Solve in the visible Real/Complex domain. a=b=0 means all values; a=0 and b≠0 means no solution. No empty field is treated as zero.
Quadratic equation
a*x^2+b*x+c = 0
x²−3*x+2 = 0 → x = 1, 2
Real coefficients; Complex allows a conjugate root pair. Reports distinguish multiplicity, no/all solutions and indeterminate numerical classification. Substitution residuals use the original coefficients.
Linear system
solveLinear(A,b)
A = ((2,1),(1,−1)), b = (5,1) → x = (2,1)
Rectangular matrices are allowed; b has one value per matrix row. The report preserves variable order and distinguishes unique, infinite, none and indeterminate. A shared unit U and b unit V give solution unit V/U. No least-squares fallback.
Find a root in an interval
f(x) = 0 within your bracket [a,b]
x^2−2 on [1,2] → numerical candidate near √2
Bisection uses 64 working digits and real numbers. It assumes a continuous function whose endpoints have opposite signs, unless an evaluated point is zero. Defaults xAbs=xRel=fRel=1e−12; each tolerance 1e−30…1e−3. At most 200 iterations / 256 evaluations. One candidate is not proof of uniqueness or all roots; a missing sign change does not prove no root.
Statistics
summary(data(...)), mean, median, modes, quartiles, percentile, variance, stddev, gmean, hmean, rms
data(1,2,3,4): mean = 5/2, population variance = 5/4
1–512 observations. Newlines or semicolons separate values, decimal point only. Quantiles use R type 7. Sample variance divides by n−1. Summary keeps valid measures when another measure is not applicable. Temperatures allow mean and spread, but not sum/GM/HM/RMS.
Weighted data
weightedData(data(values...),data(weights...),frequency|relative|probability)
Values 10,20; frequencies 1,3 → mean 35/2, sample variance 25
Every value has a weight; no blank or NA row is skipped. Frequency weights are integers, total ≤1,000,000. Relative weights use the W−W₂/W sample correction and inverse-CDF quantiles. Probability weights sum exactly 1. Zero weights are retained, but excluded from weighted ranks.
Frequency table
frequencies(data(...))
data(1,1,2,3): 1 has count 2 and relative frequency 1/2
Values are ordered numerically; all modes are shown. Frequencies and cumulative frequencies use the dataset’s weight meaning. Use weightedData(...) in Calculator for a weighted frequency table.
Conditional probability
P(A|B) = P(A∩B)/P(B)
3/10 divided by 1/2 = 3/5
Enter probabilities from 0 to 1. For example, 20%, 0.2 and 1/5 are equivalent. P(B)>0 and P(A∩B)≤P(B). No independence assumption is made.
Bayes — two hypotheses
P(H|E) = P(H)*P(E|H)/P(E)
1/5, 3/4, 1/4 → evidence 7/20; posterior 3/7
Enter probabilities from 0 to 1. Zero evidence is undefined. This uses the two explicitly supplied complementary hypotheses; it never assumes equal likelihoods.
Bayes — partition
P(Hᵢ|E) = priorᵢ*likelihoodᵢ / sum(prior*likelihood)
Priors 1/2,1/2; likelihoods 1/4,3/4 → posteriors 1/4,3/4
2–32 mutually exclusive, exhaustive hypotheses. Priors must sum exactly to 1 and each have a likelihood. Zero evidence is undefined. The app cannot verify that your hypotheses form a partition.
Contingency table
Joint, marginal and row/column conditional probabilities from counts
((30,10),(20,40)): P(row 1|column 1) = 3/5
2–16 rows and columns; nonnegative integer counts with positive total ≤1,000,000. Row and column labels are positions, not input cells. A zero marginal makes only its conditional probabilities undefined. No independence test or inference is implied.
Two fractions
(a/b)+(c/d), (a/b)-(c/d), (a/b)*(c/d), (a/b)/(c/d)
2/3 + 5/6 = 3/2
Enter signed whole numbers in all four fields. Denominators cannot be zero. Division also needs a nonzero second numerator. The exact result is reduced to lowest terms; changing its display does not change its value.
Mixed to improper fraction
mixed(whole,numerator,denominator)
mixed(-1,1,2) = -3/2
The numerator must be nonnegative and smaller than the positive denominator. A negative whole part applies to the entire mixed number. For −1/2, write -mixed(0,1,2).
Decimal ↔ fraction
0.(3), 0.1(6), 1/6
0.1(6) = 1/6
Parentheses mark repeating digits. Choose Fraction, Mixed or Decimal at the result; display changes preserve the stored value.
GCD / LCM
gcd(a,b), lcm(a,b)
gcd(-18,24) = 6
Requires exact integers. Both functions return a nonnegative integer; gcd(0,0) and lcm(0,0) are 0.
Integer quotient & remainder
quorem(a,b)
quorem(-7,3): quotient −3, remainder 2
Requires exact integers and a nonzero divisor. a = b*q+r, with 0 ≤ r < abs(b).
Sign / min / max / clamp
sign(x), min(a,b,...), max(a,b,...), clamp(x,lower,upper)
clamp(12,0,10) = 10
Sign needs one value; minimum/maximum need 2–50; clamp needs value, lower bound, upper bound. Quantities must have compatible units.
Round / significant figures
round(x,places,mode), sig(x,figures,mode)
round(1.005,2,halfAway) = 1.01
Negative decimal places round tens, hundreds and so on. Significant figures must be positive. Functional rounding changes the value; the result label records the chosen precision.
Factors / divisors / primes
factor(n), divisors(n), isPrime(n), nextPrime(n), prevPrime(n)
factor(360) = 2³ · 3² · 5
These bounded tasks require exact integers with absolute value at most 4294967295. Next/previous prime are strictly greater/smaller. Factor 0 and previous prime before 2 are undefined.
Percentage of a value
pctOf(base,percentage)
pctOf(250,12) = 30
Enter 12 for 12%; do not add the % sign.
Part / total percentage
pctPart(part,total)
pctPart(30,250) = 12%
The total is the denominator and must not be zero.
Percentage change
pctChange(old,new)
pctChange(80,100) = 25%
Uses 100*(new−old)/abs(old). A zero original value has no relative percentage change.
Percentage-point difference
pctPoints(old,new)
5% to 8% = 3 percentage points
Subtracts the two percentages. This is different from the relative percentage change, which would be 60%.
Symmetric difference (%)
pctDiff(a,b)
pctDiff(80,100) = 200/9 %
Uses 200*abs(a−b)/(abs(a)+abs(b)); both zero gives zero.
Recover original value
pctBase(final,change)
pctBase(120,20) = 100
Divides by 1+change/100. A −100% change cannot be inverted.
Successive % changes
pctChain(base,p1,p2,...)
pctChain(100,10,-10) = 99
Each percentage applies to the preceding subtotal. Enter a negative percentage for a discount; up to 50 changes.
Tax: net ↔ gross
gross(net,rate), net(gross,rate)
gross(100,21) = 121
Use your own nonnegative rate. No country rate or tax advice is supplied.
Margin / markup / sale price
margin(cost,sale), markup(cost,sale), saleMargin(cost,p), saleMarkup(cost,p)
margin(80,100) = 20%; markup(80,100) = 25%
Margin uses selling price as the denominator; markup uses cost. For sale from margin, 100% is undefined. Negative values are mathematical scenarios.
Simplify a ratio
ratio(w1,w2,...)
ratio(1/2,3/4) = 2:3
Use 2–50 exact nonnegative weights; at least one must be positive.
Proportion & scale
direct(a,b,c), inverse(a,b,c)
direct(2,3,4) = 6; scale factor = 2
Direct gives b*c/a (scale c/a); inverse gives a*b/c (scale a/c). The relevant denominator cannot be zero.
Weighted mean
weightedMean(v1,w1,v2,w2,...)
weightedMean(10,1,20,3) = 35/2
Use the same number of values and weights, up to 50 pairs. Weights are nonnegative with a positive total.
Divide an amount by weights
allocate(total,w1,...), allocateRounded(total,step,mode,w1,...)
10, step .01, equal weights → 3.34, 3.33, 3.33
Round the total first; largest remainders receive remaining steps, with ties in input order. Requires exact nonnegative total/weights and a positive step.
Price per unit
unitPrice(total,quantity)
unitPrice(12,3) = 4 per unit
Total must be nonnegative and quantity positive. The currency/unit label is your chosen context, not a live conversion.
Tip & split a bill
tax = subtotal*tax/100; tip = selected base*tip/100; split rounded total
100 + 10% tip, 3 people → 36.67, 36.67, 36.66
Uses your own nonnegative rates. Rounds the total and distributes whole steps while preserving that total. Requires Exact fractions.
Length / mass / duration
to(value*fromUnit,toUnit)
to(1*in,mm)
Use explicit multiplication. The unit conversion keeps the quantity type; incompatible dimensions give an error.
Area & volume
to(value*fromUnit,toUnit)
to(1*in^2,cm^2)
Use explicit multiplication. The unit conversion keeps the quantity type; incompatible dimensions give an error.
Temperature / differences
to(temp(value,scale),target); to(value*deltaF,deltaC)
to(temp(32,degF),degC) = 0 °C
Absolute temperatures use offsets and cannot be added or multiplied together. Differences have no offset. Below 0 K is refused.
Speed & acceleration
to(value*fromUnit,toUnit)
to(1*km/h,m/s)
Use explicit multiplication. The unit conversion keeps the quantity type; incompatible dimensions give an error.
Force/pressure/energy/power
to(value*fromUnit,toUnit)
to(1*bar,Pa)
Use explicit multiplication. The unit conversion keeps the quantity type; incompatible dimensions give an error.
Angles / DMS
dms(sign,degrees,minutes,seconds), to(angle,unit), toDMS(angle)
to(dms(-1,0,30,0),deg) = −0.5 deg
DMS sign is 1 or −1; degrees are a nonnegative integer, minutes 0–59, seconds 0–<60. Explicit angle units override DEG/RAD in trig.
Units & dimensions
to(quantity,targetUnit), valueIn(quantity,targetUnit)
to(2*m+30*cm,cm) = 230 cm
Use * explicitly. Canonical SI prefixes, compound units and powers are accepted. Target units contain only units, parentheses, *, / and integer powers. Leave target blank to derive SI units; incompatible dimensions fail.
Physical constants
phys_c, phys_h, phys_kB, phys_NA, phys_G, phys_g0
phys_c = 299792458 m/s
SI definitions: BIPM 2026. Measured data: NIST CODATA 2022; phys_G = 6.67430e−11 m³/(kg*s²), standard uncertainty 1.5e−15. Uncertainty is not propagated. Standard gravity is not a local gravity prediction.
Error & tolerance
error = measured−reference; allowed = max(absolute tolerance,abs(reference)*relative/100)
Reference 100, measured 98, absolute tolerance 2 → passes
Compatible scalar or linear units only. Boundary equality passes. A zero reference has no relative error; use absolute tolerance. This is no uncertainty, safety or certification model.
Margin / markup
margin(cost,sale), markup(cost,sale), saleMargin(cost,p), saleMarkup(cost,p)
Cost 80 and selling price 100 gives margin 20% and markup 25%.
Margin divides the difference by selling price; markup divides it by cost. A target margin of 100% cannot be inverted.
Unit price
unitPrice(total,quantity)
Cost 12 for 3 items gives 4 per item.
The optional unit label is descriptive text. It does not convert quantities or currencies.
Unit converter
to(value*sourceUnit,targetUnit)
1 in = 25.4 mm; 36 km/h = 10 m/s
Groups cover the local unit catalogue. Custom units allow SI prefixes and dimension expressions. Source and target dimensions must match.
Angle conversion
to(value*angleUnit,targetUnit), dms(sign,degrees,minutes,seconds), toDMS(angle)
100 gon = 90 deg; dms(-1,0,30,0) = −0.5 deg
Signed DMS has a separate sign and nonnegative fields. Converting to radians may produce an approximation. DMS output carries after rounding seconds.
Physical constants
phys_c*(1*s), phys_h, phys_kB, phys_NA, phys_G, phys_g0
phys_c*(1*s) = 299792458 m
Insert a selected constant into your own expression. Values and units use the versioned local catalogue. Measured-source labels are retained; uncertainty is not propagated.
Complex numbers
complex(re,im), polar(radius,angle), abs(z), arg(z), sqrt(z), nthRoot(z,n), roots(z,n), z^w
(1+2i)(3−4i) = 11+2i; roots(1,4) = 1, i, −1, −i
Real coordinates construct an explicit complex value. Arg uses −π < Arg ≤ π. Principal roots select k=0; all roots show every index and zero multiplicity. A bare polar angle uses DEG/RAD; explicit deg or rad overrides it. Polar presentation preserves the stored Cartesian value.
Frequency table
frequencies(data(...)); frequencies(weightedData(data(values...),data(counts...),frequency))
3,1,3,2,1,3 → counts 2,1,3 for values 1,2,3
Frequency counts must be exact nonnegative integers. Zero counts are excluded from frequencies. Entered rows and total frequency are counted separately.
Number base converter
0b101.01, 0xA.F, 0.0(0011), numerator/denominator
Hexadecimal 0xFF = decimal 255; decimal 0.1 = binary 0b0.0(0011)
Enter one number in From. Optional 0b, 0o or 0x must match From. Parentheses mark repeating digits; p/q uses From for both integers. Exact conversion keeps the full value when its preview is shortened.
Bit and word calculator
word(value), band(a,b), bor(a,b), bxor(a,b), bnot(a), shl(a,n), lshr(a,n), ashr(a,n), wadd(a,b), wsub(a,b), wmul(a,b)
Signed 8-bit wadd(127,1) = −128; lshr(-2,1) = 127; ashr(-2,1) = −1
Use band, bor, bxor, bnot, shl, lshr, ashr, wadd, wsub or wmul. Ordinary 127+1 is 128; word arithmetic uses the selected width. Exact integer operands must fit, or use word(value) for an explicit wrap. Shift counts are 0 to word size − 1.
Complex numbers, vectors and matrices
Tools has searchable Complex numbers, Vectors and Matrices tasks. Use complex(a,b), vec(a,b,...) and mat(vec(...),...) in expressions. at(v,1), at(A,1,2) and at(D,1) select a component with 1-based indices. Vector and matrix cells can be real or complex; a vector is not a dataset. Limits are 50 vector components and 10 × 10 matrix cells.
Matrix forms have native labelled cells and a TSV field. Tabs separate columns; newlines separate rows. Vectors and observations accept newlines or semicolons outside parentheses. One trailing newline is allowed. Blank rows, cells, missing weights and NA/NaN are errors; nothing is silently skipped. A comma always separates function arguments. All bulk fields together are limited to 16384 characters.
Cartesian, polar and exponential result choices reformat the same stored value. The principal argument satisfies −π < Arg ≤ π, with a branch cut on the negative real axis; Arg(0) is undefined. Exponential text always uses radians. roots(z,n) returns all distinct n-th roots for n from 1 to 50, with the principal root and multiplicities identified. Its report never automatically chooses the first root as Ans.
Dot products are Hermitian: dot(u,v) conjugates the first operand. Transpose swaps rows and columns; adjoint also conjugates. Components share compatible linear units, including explicit units on zeros. No broadcasting, matrix division, least squares or implicit vector product is supplied. Numerical rank/RREF/solutions report their tolerance and can remain indeterminate; Exact fractions uses exact zero decisions.
Equations
Choose Linear, Quadratic, Linear system or Find a root. Coefficient forms solve a*x+b=0 or a*x²+b*x+c=0 using dimensionless real coefficients. The visible domain determines whether complex solutions are allowed. Reports distinguish finite/all/none/indeterminate, root multiplicity and substitution residuals. Systems preserve the original variable order and identify unique solutions, free-parameter families, contradictions or insufficient numerical reliability.
Find a root uses bisection with 64 working digits in your real interval. It assumes a continuous dimensionless f(x), a<b and opposite endpoint signs unless an evaluated point is zero. The defaults xAbs=xRel=fRel=1e−12 are visible; open Solver tolerances to change them within 1e−30…1e−3. Both interval and residual requirements must pass. The limits are 200 iterations, 256 evaluations and 32768 visited nodes. A numerical candidate does not prove uniqueness, continuity or all roots. Missing sign change does not mean there is no root.
Data and probability
Data offers Statistics, Weighted data, Frequency table and Probability choices. data(...) keeps ordered observations. weightedData(data(values...),data(weights...),frequency) keeps weights and their meaning. Up to 512 real observations are allowed; compatible units or absolute temperatures remain typed. summary returns separately reusable named measures; modes returns every tied mode, and frequencies reports counts, relative and cumulative frequencies.
Unweighted and frequency-weighted quantiles use R type 7. Relative/probability weights use the inverse cumulative distribution. Frequency weights are nonnegative integers with total ≤1,000,000. Probability weights must sum exactly to 1. Relative sample variance uses W−W₂/W; population variance divides by W. Zero weights remain in the dataset but do not contribute to ranks. Geometric and harmonic means require the documented nonnegative/positive domain, with zero using the zero limit; RMS accepts negative real observations. A summary marks non-applicable measures without discarding valid ones.
Conditional probability uses your intersection and given probability. Binary and partition Bayes show evidence and posteriors; partition priors must sum exactly to 1. Contingency tables use observed nonnegative integer counts, up to 16 × 16 and total ≤1,000,000. A zero marginal makes only its related conditionals undefined. Enter a probability from 0 to 1. For example, 20%, 0.2 and 1/5 all mean the same probability. No independence assumption, inference, significance test or distribution model is added.
Complex values, vectors, matrices and datasets can be Ans, M or named variables. Dataset M+/M− is unavailable. Solver and analysis reports never replace Ans automatically: choose Copy value, Use as Ans or Use as variable for a named field or cell. Copy result exports full labelled human-readable text/TSV; Copy value exports a full parseable typed constructor. A truncated preview disables Copy result.
Variables and your own functions
Choose Variables. Save a variable with Name and Value or formula; save a function with Name, Parameters and Formula. Define rate = .21, then total(netAmount) = netAmount*(1+rate); total(100) gives 121. Changing rate to .09 invalidates the dependent result and recalculating gives 109. Definitions are evaluated under the request’s visible arithmetic, Real/Complex domain, angle and word settings, unless an explicit exact/approx boundary is used.
Names are case-sensitive ASCII letters followed by letters, digits or underscores, up to 32 characters. Built-ins, unit names, enums, constants, Ans/M and protected names cannot be redefined. Up to 32 variables, 16 functions and 8 parameters per function are supported; total definition text is limited to 32 KiB. Define dependencies first. Cycles and recursion are refused. A rejected change preserves the previous valid definition and your draft. Removing a referenced definition requires removing or editing its dependents first. Function parameters may shadow user variables. Ans/M cannot appear in definition formulas; Use result as variable stores the full current typed value explicitly.
Units, temperatures and constants
Use explicit multiplication: 2*m, never 2m. to(2*m+30*cm,cm) gives 230 cm. to(value,unit) retains its quantity type; valueIn(value,unit) deliberately returns only its numeric coordinate. Result unit changes presentation through the Worker and does not replace Ans or history. Target units allow only unit tokens, parentheses, *, / and integer powers. Incompatible units fail, including 2*m+3*s and sin(1*m). New compound dimensions use SI presentation; compatible addition preserves the left unit.
Units are case-sensitive. Length: m, in, ft, yd, mi, nmi; mass: g, kg, t, lb, oz, st; time: s, min, h, d, wk; area: length², ha, acre; volume: length³, L, galUS/qtUS/ptUS/flozUS/cupUS and galImp/qtImp/ptImp/flozImp. Compound speed and acceleration include m/s, km/h, mi/h, ft/s, kn, m/s², ft/s² and Gal. Other units: N, lbf, kgf, Pa, bar, atm, psi, Torr, J, Wh, eV, calTh, W, hpMech, hpMetric, Hz, C, A, mol and cd. Ambiguous gal, ton, hp, BTU, cal, month and year are not accepted.
All SI prefixes are available on permitted roots: Q, R, Y, Z, E, P, T, G, M, k, h, da, d, c, m, μ, n, p, f, a, z, y, r, q. Micro also accepts u and µ. Prefixable roots are m, g, s, A, K, mol, cd, N, Pa, J, W, Hz, C, rad, L, eV, bar and Wh. One prefix at a time: kg is kilo+g; mkg is invalid. cm^2 squares the conversion factor too. Aliases include liter/litre/l, inch, foot, yard, mile, tonne, pound, ounce, stone, hour, day, week, radian, degree, grad and knot.
Absolute temperatures use temp(value,K), degC, degF or degR. to(temp(32,degF),degC) is 0 °C. Differences use deltaK/deltaC/deltaF/deltaR; to(18*deltaF,deltaC) is 10 Δ°C. Absolute−absolute gives a difference; absolute±difference gives an absolute temperature. Absolute+absolute, multiplication, percentages and values below 0 K are refused. For a physical formula, linearize deliberately with valueIn(T,K)*K.
Angles include rad, deg, gon, arcmin, arcsec and turn. sin(90*deg) gives 1 in either DEG/RAD. dms(-1,0,30,0) preserves −0°30′; use toDMS(angle) for DMS presentation. Ordinary scalar trig keeps the selected DEG/RAD meaning.
Built-in physical constants use SI definitions from BIPM’s SI Brochure (2026) and the NIST CODATA 2022 dataset: phys_c (speed of light), phys_h (Planck), phys_kB (Boltzmann), phys_NA (Avogadro), phys_G (gravitational constant) and phys_g0 (conventional standard gravity). phys_G is measured: 6.67430e−11 m³/(kg*s²), standard uncertainty 1.5e−15. “Uses measured constant; uncertainty not propagated” remains visible through dependent formulas. This calculator does not propagate uncertainty; conventional gravity is not a prediction of local gravity.
Programmer: bases and word operations
Choose Programmer, then Expression or Base conversion. Expression accepts prefixed binary, octal and hexadecimal literals: 0b101.01 = 21/4, 0xA.F = 175/16. These prefixed literals are exact in both arithmetic modes. Base conversion reads one literal or a fraction p/q in the selected From base; a supplied prefix must agree. Decimal .1 converts exactly to 0b0.0(0011). A long repeating display is truncated visibly; Copy value retains the full fraction. Convert result uses an already evaluated scalar and preserves its approximation status.
Word size is 8, 16, 32 or 64 bits; initially 32 signed. Ordinary arithmetic does not wrap: 127+1 gives 128. word(x) wraps explicitly modulo 2^width; word(x,8,unsigned) records an explicit context. wadd(a,b), wsub(a,b), wmul(a,b) are wrapped operations with overflow notices. In 8 signed, wadd(127,1) is −128 with pattern 0x80. Words keep their width/signedness in Ans, M, variables and history; using a different word context requires an explicit cast.
band(a,b), bor(a,b), bxor(a,b), bnot(x), shl(x,n), lshr(x,n) and ashr(x,n) require exact integers in the selected range or explicitly constructed words. In 8 signed, lshr(-2,1) gives 127, ashr(-2,1) gives −1. Shift counts are integers 0 ≤ n < width. Left shifts report lost nonzero bits. ^ stays power and % stays percentage.
Precision and display
Standard calculations use 64 significant working digits. That does not mean every result has 64 correct digits or is exact. Most answers display about 14 significant digits; a “Rounded display” label identifies rounding. Working digits show the stored value, up to the available precision. Auto, Scientific and Engineering change only the display.
Large operations can lose small differences. For example, (1e308+1)-1e308 can give 0 with this fixed precision. In Standard, large factorials, combinations and permutations are approximate. Exact fractions preserves supported integer results without intermediate rounding. Values such as 1e400 and 1e-400 are supported without turning into Infinity or zero merely because they exceed ordinary JavaScript number ranges.
Ans and M keep the internal value. Copy result copies the visible, possibly rounded answer, so pasting it back can produce a different calculation. Engineering notation uses exponents that are multiples of three.
Ans, memory and history
Ans is your last successful reusable value and starts unset; reports change it only through an explicit field selection. Calculate always evaluates the displayed expression again. After calculating 2, Ans+1 gives 3; choosing Calculate again gives 4. Errors leave Ans unchanged.
M starts at 0. MS stores a valid answer; M+ adds it to M; M− subtracts it. MR inserts the reference M; MC resets M to 0. Clear erases the current expression and result. Changing M invalidates a result that used M; changing an expression or angle invalidates its result.
History keeps completed calculations with the original inputs, results and settings. Choose an entry to restore it without running it. The original result stays visible. Recalculate uses the saved settings and any needed variables. Choose Use current settings or edit the input to use the settings and variables you have now.
History is temporary by default. “Remember history on this device” saves up to 50 entries for 30 days each, within 1 MiB. Remove one entry, choose Clear history or turn remembering off to delete saved calculations. Privacy details.
Older calculation contexts
Restored older calculations retain their original Real, grammar and name rules. Names such as i, mean, mat or data may have been user definitions. Editing or choosing Use current settings blocks reinterpretation when such a name conflicts. Keep or copy the old context, or create new definitions with free names in Variables. History restoration never replaces your current definition library or rewrites old formula text.