How it works

1. Enter your formulas and text (in quotes) into the "Code" box on the left.
2. Press F5 or click to calculate. The results will appear in the "Output" box on the right.
3. Click to print or to copy the output, or export it to Html , PDF or Word .

The language

The Calcpad language includes the following elements (click an item to insert):

- Real numbers: digits 0 - 9 and decimal point ".";
- Complex numbers: re ± im i (e.g. 3 - 2 i);
- Vectors: [v1; v2; v3; …; vn];
- Matrices: [M11; M12; … ; M1n | M21; M22; … ; M2n | … | Mm1; Mm2; … ; Mmn]
- +Variables:
  - all Unicode letters;
  - digits: 0 - 9;
  - comma: " , ";
  - special symbols: ′ , ″ , ‴ , ⁗ , ‾ , ø , Ø , ° , ∡ ;
  - superscripts: ⁰ , ¹ , ² , ³ , ⁴ , ⁵ , ⁶ , ⁷ , ⁸ , ⁹ , ⁿ , ⁺ , ⁻ ;
  - subscripts: ₀ , ₁ , ₂ , ₃ , ₄ , ₅ , ₆ , ₇ , ₈ , ₉ , ₊ , ₋ , ₌ , ₍ , ₎ ;
  - " _ " (underscore) for subscript;
  Any variable name must start with a letter or ∡. Names are case sensitive.
- Constants: π, e, φ, γ, g, G, ME, MS, c, h, μ0, ε0, ke, e, me, mp, mn, NA, σ, kB, R, F, γc, γs, γa, γg, γw
- +Operators:
  "!" - factorial;
  "^" - exponent;
  "/" - division;
  "÷" - force division bar in inline mode and slash in pro mode (//);
  "\" - integer division;
  "⦼" - modulo (remainder, %%);
  "*" - multiplication;
  "-" - minus;
  "+" - plus;
  "≡" - equal to (==);
  "≠" - not equal to (!=);
  "<" - less than;
  ">" - greater than;
  "≤" - less or equal (<=);
  "≥" - greater or equal (>=);
  "∧" - logical "AND" (&&);
  "∨" - logical "OR" (||);
  "⊕" - logical "XOR" (^^);
  "∠" - phasor A∠φ (<<);
  "=" - assignment or definition of a variable, function or macro;
  "←" - assignment to an outer level or global variable in block (<*);
- Custom functions of type f(x; y; z; …);
- +Built-in functions:
  - +Trigonometric:
    sin(x) - sine;
    cos(x) - cosine;
    tan(x) - tangent;
    csc(x) - cosecant;
    sec(x) - secant;
    cot(x) - cotangent;
  - +Hyperbolic:
    sinh(x) - hyperbolic sine;
    cosh(x) - hyperbolic cosine;
    tanh(x) - hyperbolic tangent;
    csch(x) - hyperbolic cosecant;
    sech(x) - hyperbolic secant;
    coth(x) - hyperbolic cotangent;
  - +Inverse trigonometric:
    asin(x) - inverse sine;
    acos(x) - inverse cosine;
    atan(x) - inverse tangent;
    atan2(x; y) - the angle whose tangent is the quotient of y and x;
    acsc(x) - inverse cosecant;
    asec(x) - inverse secant;
    acot(x) - inverse cotangent;
  - +Inverse hyperbolic:
    asinh(x) - inverse hyperbolic sine;
    acosh(x) - inverse hyperbolic cosine;
    atanh(x) - inverse hyperbolic tangent;
    acsch(x) - inverse hyperbolic cosecant;
    asech(x) - inverse hyperbolic secant;
    acoth(x) - inverse hyperbolic cotangent;
  - +Logarithmic, exponential and roots:
    log(x) - decimal logarithm;
    ln(x) - natural logarithm;
    log_2(x) - binary logarithm;
    exp(x) - natural exponent = eˣ ;
    sqr(x) or sqrt(x) - square root;
    cbrt(x) - cubic root;
    root(x; n) - n-th root;
  - +Rounding:
    round(x) - round to the nearest integer;
    floor(x) - round to the smaller integer (towards -∞);
    ceiling(x) - round to the greater integer (towards +∞);
    trunc(x) - round to the smaller integer (towards zero);
  - +Integer:
    mod(x; y) - the remainder of an integer division;
    gcd(x; y; z…) - the greatest common divisor of several integers;
    lcm(x; y; z…) - the least common multiple of several integers;
  - +Complex:
    re(z) - the real part of a complex number;
    im(z) - the imaginary part of a complex number;
    abs(x) - absolute value/magnitude;
    phase(z) - the phase of a complex number;
    conj(z) - the conjugate of a complex number;
  - +Aggregate and interpolation:
    min(M; ⃗v; x…) - minimum of multiple values;
    max(M; ⃗v; x…) - maximum of multiple values;
    sum(M; ⃗v; x…) - sum of multiple values;
    sumsq(M; ⃗v; x…) - sum of squares;
    srss(M; ⃗v; x…) - square root of sum of squares;
    average(M; ⃗v; x…) - average of multiple values;
    product(M; ⃗v; x…) - product of multiple values;
    mean(M; ⃗v; x…) - geometric mean;
    take(n; M; ⃗v; x…) - the n-th element from the list;
    line(x; M; ⃗v; y…) - linear interpolation;
    spline(x; M; ⃗v; y…) - Hermite spline interpolation;
  - +Conditional and logical:
    if(cond; value-if-true; value-if-false) - conditional evaluation;
    switch(cond1; value1; cond2; value2; …; default) - selective evaluation;
    not(x) - logical "NOT";
    and(M; ⃗v; x…) - logical "AND";
    or(M; ⃗v; x…) - logical "OR";
    xor(M; ⃗v; x…) - logical "XOR";
  - +Other:
    sign(x) - sign of a number;
    random(x) - a random number between 0 and x;
    getunits(x) - gets the units of x without the value. Returns 1 if x is unitless;
    setunits(x; u) - sets the units u to x where x can be scalar, vector or matrix;
    clrunits(x) - clears the units from a scalar, vector or matrix x;
    hp(x) - converts x to its high performance (hp) equivalent type;
    ishp(x) - checks if the type of x is a high-performance (hp) vector or matrix;
  - +Vector:
    Creational:
    vector(n) - creates an empty vector with length n;
    vector_hp(n) - creates an empty high performance (hp) vector with length n;
    range(x1; xn; step) - creates a vector with values spanning from x1 to xn with step step;
    range_hp(x1; xn; step)- creates a high performance (hp) from a range of values as above;
    Structural:
    len(⃗v) - returns the length of vector ⃗v;
    size(⃗v) - the actual size of vector ⃗v (the index of the last non-zero element);
    resize(⃗v; n) - sets a new length n of vector ⃗v;
    fill(⃗v; x) - fills vector ⃗v with value x;
    join(M; ⃗v; x…) - creates a vector by joining the arguments: matrices, vectors and scalars;
    slice(⃗v; i1; i2) - returns the part of vector ⃗v bounded by indexes i1 and i2 inclusive;
    first(⃗v; n) - the first n elements of vector ⃗v;
    last(⃗v; n) - the last n elements of vector ⃗v;
    extract(⃗v; ⃗vi) - extracts the elements from ⃗v which indexes are contained in ⃗vi;
    Data:
    sort(⃗v) - sorts the elements of vector ⃗v in ascending order;
    rsort(⃗v) - sorts the elements of vector ⃗v in descending order;
    order(⃗v) - the indexes of vector ⃗v, arranged by the ascending order of its elements;
    revorder(⃗v) - the indexes of vector ⃗v, arranged by the descending order of its elements;
    reverse(⃗v) - a new vector containing the elements of ⃗v in reverse order;
    count(⃗v; x; i) - the number of elements in ⃗v, after the i-th one, that are equal to x;
    search(⃗v; x; i)- the index of the first element in ⃗v, after the i-th one, that is equal to x;
    find(⃗v; x; i) or
    find_eq(⃗v; x; i) - the indexes of all elements in ⃗v, after the i-th one, that are = x;
    find_ne(⃗v; x; i) - the indexes of all elements in ⃗v, after the i-th one, that are ≠ x;
    find_lt(⃗v; x; i) - the indexes of all elements in ⃗v, after the i-th one, that are < x;
    find_le(⃗v; x; i) - the indexes of all elements in ⃗v, after the i-th one, that are ≤ x;
    find_gt(⃗v; x; i) - the indexes of all elements in ⃗v, after the i-th one, that are > x;
    find_ge(⃗v; x; i) - the indexes of all elements in ⃗v, after the i-th one, that are ≥ x;
    lookup(⃗a; ⃗b; x) or
    lookup_eq(⃗a; ⃗b; x) - all elements in ⃗a for which the respective elements in ⃗b are = x;
    lookup_ne(⃗a; ⃗b; x) - all elements in ⃗a for which the respective elements in ⃗b are ≠ x;
    lookup_lt(⃗a; ⃗b; x) - all elements in ⃗a for which the respective elements in ⃗b are < x;
    lookup_le(⃗a; ⃗b; x) - all elements in ⃗a for which the respective elements in ⃗b are ≤ x;
    lookup_gt(⃗a; ⃗b; x) - all elements in ⃗a for which the respective elements in ⃗b are > x;
    lookup_ge(⃗a; ⃗b; x) - all elements in ⃗a for which the respective elements in ⃗b are ≥ x;
    Math:
    norm_1(⃗v) - L1 (Manhattan) norm of vector ⃗v;
    norm(⃗v) or
    norm_2(⃗v) or
    norm_e(⃗v) - L2 (Euclidean) norm of vector ⃗v;
    norm_p(⃗v; p) - Lp norm of vector ⃗v;
    norm_i(⃗v) - L∞ (infinity) norm of vector ⃗v;
    unit(⃗v) - the normalized vector ⃗v (with L2 norm = 1);
    dot(⃗a; ⃗b) - scalar product of two vectors ⃗a and ⃗b;
    cross(⃗a; ⃗b) - cross product of two vectors ⃗a and ⃗b (with length 2 or 3);
  - +Matrix:
    Creational:
    matrix(m; n) - creates an empty matrix with dimensions m⨯n;
    identity(n) - creates an identity matrix with dimensions n⨯n;
    diagonal(n; d) - creates a n⨯n diagonal matrix and fills the diagonal with value d;
    column(m; c) - creates a column matrix with dimensions m⨯1, filled with value c;
    utriang(n) - creates an upper triangular matrix with dimensions n⨯n;
    ltriang(n) - creates a lower triangular matrix with dimensions n⨯n;
    symmetric(n) - creates a symmetric matrix with dimensions n⨯n;
    matrix_hp(m; n) - creates a high-performance (hp) matrix with dimensions m⨯n;
    identity_hp(n) - creates a high-performance (hp) identity matrix with dimensions n⨯n;
    diagonal_hp(n; d) - creates a high-performance (hp) n⨯n diagonal matrix filled with value d;
    column_hp(m; c) - creates a high-performance (hp) m⨯1 column matrix filled with value c;
    utriang_hp(n) - creates a high-performance (hp) n⨯n upper triangular matrix;
    ltriang_hp(n) - creates a high-performance (hp) n⨯n lower triangular matrix;
    symmetric_hp(n) - creates a high-performance (hp) symmetric matrix with dimensions n⨯n;
    vec2diag(⃗v) - creates a diagonal matrix from the elements of vector ⃗v;
    vec2row(⃗v) - creates a row matrix from the elements of vector ⃗v;
    vec2col(⃗v) - creates a column matrix from the elements of vector ⃗v;
    join_cols(⃗c1; ⃗c2; ⃗c3…) - creates a new matrix by joining column vectors;
    join_rows(⃗r1; ⃗r2; ⃗r3…) - creates a new matrix by joining row vectors;
    augment(A; B; C…) - creates a new matrix by appending matrices A; B; C side by side;
    stack(A; B; C…) - creates a new matrix by stacking matrices A; B; C one below the other;
    Structural:
    n_rows(M) - number of rows in matrix M;
    n_cols(M) - number of columns in matrix M;
    mresize(M; m; n) - sets new dimensions m and n for matrix M;
    mfill(M; x) - fills matrix M with value x;
    fill_row(M; i; x) - fills the i-th row of matrix M with value x;
    fill_col(M; j; x) - fills the j-th column of matrix M with value x;
    copy(A; B; i; j) - copies all elements from A to B, starting from indexes i and j of B;
    add(A; B; i; j) - adds all elements from A to those of B, starting from indexes i and j of B;
    row(M; i) - extracts the i-th row of matrix M as a vector;
    col(M; j) - extracts the j-th column of matrix M as a vector;
    extract_rows(M; ⃗vi) - extracts the rows from matrix M whose indexes are contained in vector ⃗vi;
    extract_cols(M; ⃗vj) - extracts the columns from matrix M whose indexes are contained in vector ⃗vj;
    diag2vec(M) - extracts the diagonal elements of matrix M to a vector;
    submatrix(M; i1; i2; j1; j2) - extracts a submatrix of M, bounded by rows i1 and i2 and columns j1 and j2, incl.;
    Data:
    sort_cols(M; i) - sorts the columns of M based on the values in row i in ascending order;
    rsort_cols(M; i) - sorts the columns of M based on the values in row i in descending order;
    sort_rows(M; j) - sorts the rows of M based on the values in column j in ascending order;
    rsort_rows(M; j) - sorts the rows of M based on the values in column j in descending order;
    order_cols(M; i) - the indexes of the columns of M based on the ordering of the values from row i in ascending order;
    revorder_cols(M; i) - the indexes of the columns of M based on the ordering of the values from row i in descending order;
    order_rows(M; j) - the indexes of the rows of M based on the ordering of the values in column j in ascending order;
    revorder_rows(M; j) - the indexes of the rows of M based on the ordering of the values in column j in descending order;
    mcount(M; x) - number of occurrences of value x in matrix M;
    msearch(M; x; i; j) - vector with the two indexes of the first occurrence of x in matrix M, starting from indexes i and j;
    mfind(M; x) or
    mfind_eq(M; x) - the indexes of all elements in M that are = x;
    mfind_ne(M; x) - the indexes of all elements in M that are ≠ x;
    mfind_lt(M; x) - the indexes of all elements in M that are < x;
    mfind_le(M; x) - the indexes of all elements in M that are ≤ x;
    mfind_gt(M; x) - the indexes of all elements in M that are > x;
    mfind_ge(M; x) - the indexes of all elements in M that are ≥ x;
    hlookup(M; x; i1; i2) or
    hlookup_eq(M; x; i1; i2) - the values from row i2 of M, for which the elements in row i1 are = x;
    hlookup_ne(M; x; i1; i2) - the values from row i2 of M, for which the elements in row i1 are ≠ x;
    hlookup_lt(M; x; i1; i2) - the values from row i2 of M, for which the elements in row i1 are < x;
    hlookup_le(M; x; i1; i2) - the values from row i2 of M, for which the elements in row i1 are ≤ x;
    hlookup_gt(M; x; i1; i2) - the values from row i2 of M, for which the elements in row i1 are > x;
    hlookup_ge(M; x; i1; i2) - the values from row i2 of M, for which the elements in row i1 are ≥ x;
    vlookup(M; x; j1; j2) or
    vlookup_eq(M; x; j1; j2) - the values from column j2 of M, for which the elements in column j1 are = x;
    vlookup_ne(M; x; j1; j2) - the values from column j2 of M, for which the elements in column j1 are ≠ x;
    vlookup_lt(M; x; j1; j2) - the values from column j2 of M, for which the elements in column j1 are < x;
    vlookup_le(M; x; j1; j2) - the values from column j2 of M, for which the elements in column j1 are ≤ x;
    vlookup_gt(M; x; j1; j2) - the values from column j2 of M, for which the elements in column j1 are > x;
    vlookup_ge(M; x; j1; j2) - the values from column j2 of M, for which the elements in column j1 are ≥ x;
    Math:
    hprod(A; B) - Hadamard product of matrices A and B;
    fprod(A; B) - Frobenius product of matrices A and B;
    kprod(A; B) - Kronecker product of matrices A and B;
    mnorm_1(M) - L1 norm of matrix M;
    mnorm(M) or
    mnorm_2(M) - L2 norm of matrix M;
    mnorm_e(M) - Frobenius norm of matrix M;
    mnorm_i(M) - L∞ norm of matrix M;
    cond_1(M) - condition number of M based on the L1 norm;
    cond(M) or
    cond_2(M) - condition number of M based on the L2 norm;
    cond_e(M) - condition number of M based on the Frobenius norm;
    cond_i(M) - condition number of M based on the L∞ norm;
    det(M) - determinant of matrix M;
    rank(M) - rank of matrix M;
    trace(M) - trace of matrix M;
    transp(M) - transpose of matrix M;
    adj(M) - adjugate of matrix M;
    cofactor(M) - cofactor matrix of M;
    eigenvals(M; ne) - the first ne eigenvalues of matrix M (or all if omitted);
    eigenvecs(M; ne) - the first ne eigenvectors of matrix M (or all if omitted);
    eigen(M; ne) - the first ne eigenvalues and eigenvectors of matrix M (or all if omitted);
    cholesky(M) - Cholesky decomposition of a symmetric, positive-definite matrix M;
    lu(M) - LU decomposition of matrix M;
    qr(M) - QR decomposition of matrix M;
    svd(M) - singular value decomposition of M;
    inverse(M) - inverse of matrix M;
    lsolve(A; ⃗b) - solves the system of linear equations A⃗x = ⃗b using LDLT decomposition for symmetric matrices, and LU for non-symmetric;
    clsolve(A; ⃗b) - solves the linear matrix equation A⃗x = ⃗b with symmetric, positive-definite coefficient matrix A using Cholesky decomposition;
    slsolve(A; ⃗b) - solves the linear matrix equation A⃗x = ⃗b with high-performance symmetric, positive-definite matrix A using preconditioned conjugate gradient (PCG) method;
    msolve(A; B) - solves the generalized matrix equation AX = B using LDLT decomposition for symmetric matrices, and LU for non-symmetric;
    cmsolve(A; B) - solves the generalized matrix equation AX = B with symmetric, positive-definite coefficient matrix A using Cholesky decomposition;
    smsolve(A; B) - solves the generalized matrix equation AX = B with high-performance symmetric, positive-definite matrix A using preconditioned conjugate gradient (PCG) method;
    matmul(A; B) - fast multiplication of square hp matrices using parallel Winograd algorithm. The multiplication operator A*B uses it internally for all square hp matrices of size 10 and larger;
    fft(M) - performs fast Fourier transform of row-major matrix M. It must have one row for real data and two rows for complex;
    ift(M) - performs inverse Fourier transform of row-major matrix M. It must have one row for real data and two rows for complex;
    Double interpolation:
    take(x; y; M) - returns the element of matrix M at indexes x and y;
    line(x; y; M) - double linear interpolation from the elements of matrix M based on the values of x and y;
    spline(x; y; M) - double Hermite spline interpolation from the elements of matrix M based on the values of x and y.
    Tol - target tolerance for the iterative PCG solver.
- Comments: "Title" or 'text' in double or single quotes. HTML, CSS, JS and SVG are allowed.
- +Graphing and plotting:
  $Plot{f(x) @ x = a : b} - simple plot;
  $Plot{x(t) | y(t) @ t = a : b} - parametric;
  $Plot{f1(x) & f2(x) & … @ x = a : b} - multiple;
  $Plot{x1(t) | y1(t) & x2(t) | y2(t) & … @ t = a : b} - multiple parametric;
  $Map{f(x; y) @ x = a : b & y = c : d} - 2D color map of a 3D surface;
  PlotHeight - height of plot area in pixels;
  PlotWidth - width of plot area in pixels;
  PlotSVG - draw plots in vector, SVG format (= 1) or raster, PNG (= 0);
  PlotAdaptive - use adaptive mesh (= 1) for function plotting or uniform (= 0);
  PlotStep - the size of the mesh for map plotting;
  PlotShadows - draw surface plots with shadows;
  PlotLightDir - direction to light source (0-7) clockwise:
  PlotSmooth - smooth gradient coloring (= 1) or isobands (= 0) for surface plots;
  PlotPalette - the number of color palette for surface plots (0-9):
- +Iterative and numerical methods:
  $Root{f(x) = const @ x = a : b} - root finding for f(x) = const;
  $Root{f(x) @ x = a : b} - root finding for f(x) = 0;
  $Find{f(x) @ x = a : b} - similar to the above, but x is not required to be a precise solution;
  $Sup{f(x) @ x = a : b} - local maximum of a function;
  $Inf{f(x) @ x = a : b} - local minimum of a function;
  $Area{f(x) @ x = a : b} - adaptive Gauss-Lobatto numerical integration;
  $Integral{f(x) @ x = a : b} - Tanh-Sinh numerical integration;
  $Slope{f(x) @ x = a} - numerical differentiation by Richardson extrapolation;
  $Derivative{f(x) @ x = a} - numerical differentiation by complex step method;
  $Sum{f(k) @ k = a : b} - iterative sum;
  $Product{f(k) @ k = a : b} - iterative product;
  $Repeat{f(k) @ k = a : b} - iterative expression block with counter;
  $While{condition; expressions} - iterative expression block with condition;
  $Block{expressions} - multiline expression block;
  $Inline{expressions} - inline expression block;
  Precision - relative precision for numerical methods [10-2; 10-15] (default is 10-14)
- +Program flow control:
  Simple:
  #if condition
  your code goes here
  #end if
  Alternative:
  #if condition
  your code goes here
  #else
  some other code
  #end if
  Complete:
  #if condition1
  your code goes here
  #else if condition2
  your code goes here
  #else
  some other code
  #end if
  You can add as many "#else if"s as needed, but only one "#else". You can any of them.
- +Iteration blocks:
  Simple:
  #repeat number of repetitions
  your code goes here
  #loop
  With conditional break/continue:
  #repeat number of repetitions
  your code goes here
  #if condition
  #break or #continue
  #end if
  some more code
  #loop
  With counter:
  #for counter = start : end
  your code goes here
  #loop
  With condition:
  #while condition
  your code goes here
  #loop
- +Modules and macros/string variables:
  Modules:
  #include filename - include external file (module);
  #local - start local section (not to be included);
  #global - start global section (to be included);
  Inline string variable:
  #def variable_name$ = content
  Multiline string variable:
  #def variable_name$
  content line 1
  content line 2
  …
  #end def
  Inline macro:
  #def macro_name$(param1$; param2$;…) = content
  Multiline macro:
  #def macro_name$(param1$; param2$;…)
  content line 1
  content line 2
  …
  #end def
- +Import/Export of external data:
  Text/CSV files:
  #read M from filename.txt@R1C1:R2C2 TYPE=R SEP=',' - read matrix M from a text/CSV file;
  #write M to filename.txt@R1C1:R2C2 TYPE=N SEP=',' - write matrix M to a text/CSV file;
  #append M to filename.txt@R1C1:R2C2 TYPE=N SEP=',' - append matrix M to a text/CSV file;
  Excel files (xlsx and xlsm):
  #read M from filename.xlsx@Sheet1!A1:B2 TYPE=R - read matrix M from an Excel file;
  #write M to filename.xlsx@Sheet1!A1:B2 TYPE=N - write matrix M to an Excel file;
  #append M to filename.xlsx@Sheet1!A1:B2 TYPE=N - append matrix M to an Excel file;
  Sheet, range, TYPE and SEP can be omitted.
  For #read command, TYPE can be either of [R|D|C|S|U|L|V].
  For #write and #append commands, TYPE can be Y or N.
- Write protection: #const - declares a constant (readonly) variable or function;
- +Output control:
  #hide - hide the report contents;
  #show - always show the contents (default);
  #pre - show the next contents only before calculations;
  #post - show the next contents only after calculations;
  #val - show only the final result, without the equation;
  #equ - show complete equations and results (default);
  #noc - show only equations without results (no calculations);
  #nosub - do not substitute variables (no substitution);
  #novar - show equations only with substituted values (no variables);
  #varsub - show equations with variables and substituted values (default);
  #split - split equations that do not fit on a single line;
  #wrap - wrap equations that do not fit on a single line (default);
  #round n - rounds the output to n digits after the decimal point;
  #round default - restores rounding to the default settings;
  #format FFFF - specifies custom format string;
  #format default - restores the default formatting;
  #md on - enables markdown in comments;
  #md off - disables markdown in comments;
  #phasor - sets output format of complex numbers to polar phasor: A∠φ;
  #complex - sets output format of complex numbers to Cartesian algebraic: a + bi.
  Each of the above commands is effective after the current line until the end of the report or another command that overrides it.
- +Breakpoints for step-by-step execution:
  #pause - calculates down to the current line and waits for the user to resume manually;
  #input - renders an input form to the current line and waits for user input.
- Switches for trigonometric units: #deg - degrees, #rad - radians; #gra - grades;
- Separator for target units: |;
- Return angles with units: ReturnAngleUnits = 1;
- Dimensionless units: %, ‰, ‱, pcm, ppm, ppb, ppt, ppq;
- Angle units: °, ′, ″, deg, rad, grad, rev;
- +Metric units (SI and compatible):
  Mass: g, hg, kg, t, kt, Mt, Gt, dg, cg, mg, μg, ng, pg, Da (or u);
  Length: m, km, dm, cm, mm, μm, nm, pm, AU, ly;
  Time: s, ms, μs, ns, ps, min, h, d, w, y;
  Frequency: Hz, kHz, MHz, GHz, THz, mHz, μHz, nHz, pHz, rpm;
  Speed: kmh;
  Electric current: A, kA, MA, GA, TA, mA, μA, nA, pA;
  Temperature: °C, Δ°C, K;
  Amount of substance: mol;
  Luminous intensity: cd;
  Area: a, daa, ha;
  Volume: L, daL, hL, dL, cL, mL, μL, nL, pL;
  Force: N, daN, hN, kN, MN, GN, TN, gf, kgf, tf, dyn;
  Moment: Nm, kNm;
  Pressure: Pa, daPa, hPa, kPa, MPa, GPa, TPa,
  dPa, cPa, mPa, μPa, nPa, pPa,
  bar, mbar, μbar, atm, at, Torr, mmHg;
  Viscosity: P, cP, St, cSt;
  Energy work: J, kJ, MJ, GJ, TJ, mJ, μJ, nJ, pJ,
  Wh, kWh, MWh, GWh, TWh, mWh, μWh, nWh, pWh,
  eV, keV, MeV, GeV, TeV, PeV, EeV, cal, kcal, erg;
  Power: W, kW, MW, GW, TW, mW, μW, nW, pW, hpM, ks,
  VA, kVA, MVA, GVA, TVA, mVA, μVA, nVA, pVA,
  VAR, kVAR, MVAR, GVAR, TVAR, mVAR, μVAR, nVAR, pVAR;
  Electric charge: C, kC, MC, GC, TC, mC, μC, nC, pC, Ah, mAh;
  Potential: V, kV, MV, GV, TV, mV, μV, nV, pV;
  Capacitance: F, kF, MF, GF, TF, mF, μF, nF, pF;
  Resistance: Ω, kΩ, MΩ, GΩ, TΩ, mΩ, μΩ, nΩ, pΩ;
  Conductance: S, kS, MS, GS, TS, mS, μS, nS, pS,
  ℧, k℧, M℧, G℧, T℧, m℧, μ℧, n℧, p℧;
  Magnetic flux: Wb , kWb, MWb, GWb, TWb, mWb, μWb, nWb, pWb;
  Magnetic flux density: T, kT, MT, GT, TT, mT, μT, nT, pT;
  Inductance: H, kH, MH, GH, TH, mH, μH, nH, pH;
  Luminous flux: lm;
  Illuminance: lx;
  Radioactivity: Bq, kBq, MBq, GBq, TBq, mBq, μBq, nBq, pBq, Ci, Rd;
  Absorbed dose: Gy, kGy, MGy, GGy, TGy, mGy, μGy, nGy, pGy;
  Equivalent dose: Sv, kSv, MSv, GSv, TSv, mSv, μSv, nSv, pSv;
  Catalytic activity: kat;
- +Non-metric units (Imperial/US):
  Mass: gr, dr, oz, lb (or lbm, lb_m), kipm (or kip_m), st, qr,
  cwt (or cwt_UK, cwt_US), ton (or ton_UK, ton_US), slug;
  Length: th, in, ft, yd, ch, fur, mi, ftm (or ftm_UK, ftm_US),
  cable (or cable_UK, cable_US), nmi, li, rod, pole, perch, lea;
  Speed: mph, knot;
  Temperature: °F, Δ°F, °R;
  Area: rood, ac;
  Volume, fluid: fl_oz, gi, pt, qt, gal, bbl, or:
  fl_oz_UK, gi_UK, pt_UK, qt_UK, gal_UK, bbl_UK,
  fl_oz_US, gi_US, pt_US, qt_US, gal_US, bbl_US;
  Volume, dry: (US) pt_dry, (US) qt_dry, (US) gal_dry, (US) bbl_dry,
  pk (or pk_UK, pk_US), bu (or bu_UK, bu_US);
  Force: ozf (or oz_f), lbf (or lb_f), kip (or kipf, kip_f), tonf (or ton_f), pdl;
  Pressure: osi, osf psi, psf, ksi, ksf, tsi, tsf, inHg;
  Energy/work: BTU, therm, (or therm_UK, therm_US), quad;
  Power: hp, hpE, hpS;
- Custom units: .Name = expression.
  Names can include currency symbols: €, £, ₤, ¥, ¢, ₽, ₹, ₩, ₪.