Type a computation or program in the commandline, for
Helpers are available by pressing Math
or Prog or 123 (scientific keyboard).
Press enter or hit ✅ to run the computation.
Find commandnames with the helpers or by reading the sections
below or in the
To get online help on a command, enter the commandname and press
the ? button or F1 key.
You can exchange Xcas sessions by email. Fill in once the email
fields in the Settings (topleft button).
You can send a session by clicking on the Mail link, modify the To
field if necessary.
When you receive an Xcas session by email, click on the link, this
should open the session in your browser. You can modify the
session and send it back with the Mail link.
When you send a session by email, the filename of the session
will be modified by prefixing the sender email, except if the
sessionname contains @ (it remains unchanged, except if the filename begins
with @, then the leading @ is removed).
Example: a teacher sends to his students a session named
the students filename session will be exercise,
they do the work and send it back to the teacher (Mail link),
the session received by the teacher is named with the email
address of the student prefixed, it's easy for him to know
who he is correcting. The teacher can send the session back,
the name remains unchanged.
You can optionally install Xcas on your device, in order to run it
in airplane mode (without Internet connection).
To install Xcas for Firefox, download
unzip it (for example with Androzip on Android),
search the xcasen.html file and open it with your
browser (Firefox recommended). You can create a shortcut
on your welcome screen for easy access.
types, affectation, tests, loop, function, syntax
a panel of buttons: settings, save/restore session,
helpers (Xcas logo maths, programming, scientific keyboard, documentation).
Some buttons or links are not visible at startup like the Clone or
the Clone (resp. local) link may be used to replicate a
session, right-click to copy/paste the link in Xcas native or
on a static web
page. It is also useful if you stop a computation that would
take too long.
the Mail link lets you share your session by e-mail.
a help area, where you will see short descriptions of the
commands you asked the syntax. You can clear the help area with
the erase button at the right of the help search field.
the history area contains levels (0 at the
beginning), a level is a pair commandline (written in
black)/answer (in blue).
You can move levels with the ↑ and ↓ buttons.
You can modify an existing commandline, update it with the
✅ button or Enter key at the beginning of the field.
You can throw a level to the trash with the erase button at the
right of the level. You can restore levels from the trash with
the Restore button at the bottom of the history, or empty
The link + right to the Empty button lets you open
a new empty session in a new tab.
type your command or program there, then tap ✅
or hit Enter. If you want to enter a multi-line command or
program, hit Shift-Enter or tap the \n button.
For example, type 1/2+1/3
or sin(pi/4) or sin(pi/4.0).
The Math, prog and 123
buttons may be used to help you fill the commandline.
If you know a commandname, type it (or its first letters),
for example factor then press
the key or the
button. This will display a
short help on the command if it exists
or give some commandname hints if it does not or is incomplete.
For example, click on math then rewrite then
factor then ?, look at the short help at the top,
click on one example or complete with x^4-1 then type Enter.
select text with the beg
and end buttons, remove selection
with del and paste selection with cp.
You can comment an exisiting level by pressing
the ✎ key. You can write boldface, italic, etc. in a comment
using the buttons below the comment or typing HTML code.
If you want to render maths, enter a valid Xcas input between
$$, the input will be parsed unevaled and converted to MathML for 2d
display. For example $x[n+1]^2$ will display x with
exponent n+1, $A=[[1,2],[3,4]]$ will display a matrix
(it will not modify A), $integrate(sin(x),x,0,pi)$
will display the integral of sin(x) between 0 and pi (the integral will not be
a console that will display CAS messages,
syntax errors or step by step computation for commands that
support step by step (like derivative).
The console is not displayed if it is empty. You can clear
the console or adjust it's height.
a graph 3d area for 3d commands. This area
is not displayed if it is empty.
You can save the history by hitting the Save
button. The filename of the session is displayed in a modifiable text
field at the right of the Save button, it is session
by default. You can open a saved session by hitting the Load
You can export your worksheet on desktops, this
will save the whole HTML code (instead of the commandlines for a
2d graphs can be saved as SVG 1.2 files (save button at the right of
If you have a native Xcas session, you can open it in Xcas for Firefox
(native Xcas menu menu File, Clone or from commandline
xcas --online nom_fichier.xws).
Note that Chrome (or the builtin browser of your device) is
much slower than Firefox (about 5 times). Moreover Chrome
does not have builtin support to display 2d maths with
be retrieved from Internet which is slower and does not
work in airplane mode.
It is therefore recommended to run Xcas for Firefox from Firefox
Most of the documentation is in French, not yet translated.
The "hard disk" version of the documentation is available on
Linux if you have giac installed.
Otherwise, please select the Internet version.
computer algebra system compiled with emscripten. The text editors
are using the CodeMirror
Unlike many CAS web-interfaces, once the page is loaded,
it does not require a server,
It is slower than native code, about 2 times slower for numeric code,
up to 8 times slower for symbolic code.
If you run large computations, consider installing
Giac/Xcas (c) 2018 B. Parisse, R. De Graeve, Institut Fourier, Université
de Grenoble, GPL3 license. For commercial license, contact us.
Mathml and SVG code initially written by J.P. Branchard.
Optimization code written by Luka Marohnić.
There is no universal method to simplify an expression,
sometimes it's better to expand, sometimes to factor, sometimes
linearize, etc.. It is therefore important to know
commands, the most important are available by hitting Math then rewrite.
For example, hit math, rewrite, simpl
this will insert the command
type the expression you want to expand and simplify, then Enter.
are somewhat similar, less powerfull and faster: normal
does not search relations between trigonometric functions,
ratnormal does only rational simplifications.
reorder reorders a polynomial according to a list of variables.
factorizes over R
partial fraction decomposition over R,
expand trigonometrics, exponentials and logarithms,
substitution of one or more variables by one or more values
Trigonometric conversions ,
To create a vector, type the coordinates with comma as separator and
 as delimiters.
cross product in dimension 2 or 3
Matrices are vectors of vectors of the same size and can be typed in
the commandline like A:=[[1,2],[3,4]]. Alternatively, you can
hit Math then matrix to open the matrix assistant
or rand for a matrix with random coefficients.
Line and column indices begin at 0 when indexed by  and 1 when
indexed by [], for
You can use +,-,* and
for usual arithmetic operations on matrices.
transposed, : transconjugate,
row reduction to echelon form,
: LU decomposition, can be used in
eigenvectors and eigenvalues,
(w.r.t L1, L2 or Linf vector space norm)
Hit math then arit.
Some commands work on integers and polynomials, for example
gcd or lcm.
Otherwise, there are two versions,
the one working on integers begins with
i, like irem (euclidean
remainder for integers) vs rem (euclidean remainder for polynomials).
GCD and LCM
remainder and quotient (euclidean integer division)
extended GCD for integers
integer solutions of au+bv=c,
fast modular powering.
remainder and quotient for polynomial euclidean division.
The default variable is x, it can be specified as 3rd argument.
extended gcd for polynomials
polynomial solutions for au+bv=c
Use infix mod to work in ℤ/nℤ, for
example x^3+5x-11 mod 17
is a polynomial with coefficients in ℤ/17ℤ.
If you must work in a non prime finite field, run
Equation and system solving:
then solve, select exact or approx. and real or
or enter the commands
Differential equation/system solving:
approx. solver, or math, graph
hit math then u_n.
command tries to find an explicit expression for a recurrent sequence.
Hit math then f(x)
to study a function, or u_n for a sequence,
or calc for calculus commands and assistants for
discrete sums (∑), limits (limit),
antiderivatives and definite integrals (∫),
For example, let's define an univariate function
f, hit prog then
f as function
x as list of arguments and sin(x^2) as
returned value. Or type in the commandline
Once f is defined, we can compute the value of the function
and derivative like this:
' denotes the derivative with respect to x,
for other variables, use
The antiderivative command is
or for a definite integral
commands compute a limit or Taylor series (or asymptotic series expansion)
Hit mathrand opens an assistant that build
Continuous distributions commands
Discrete distributions commands
Cumulated distributions commands have a
_cdf suffix, one can also get them by passing the
distribution law and arguments to the command.
Inverse cumulated distributions have an
_icdf suffix, there is also an command.
will display an histogram of a list of value
(default class minimum 0, default class
size 1, otherwise pass them as arguments).
command splits a Markov chain transition matrix.
Hit math then graph
(see also f(x) for function variations).,
Examples of commands
displays the 2d graph of two expressions simultaneously
(sin(x) and x-x^3/6),
displays the 3d graph of x^2-y^2 together with a plane.
You can move the viewpoint with the mouse.
Some geometry commands:
The Prog displays assistants
that will help you enter programmation structures
(test, loop, function). You can add newlines with the \n
button, or with Shift-Enter (or Enter alone if you modify an
existing level). →| indents the current line.
Hit debug to run a function in step by step mode,
this will display local variables, it's very useful to debug
Example of program: sum of squares in Xcas syntax
if x > 100000 then return "Number too large"; fi;
for y from 1 to x do
Python compatible syntax def f(x):
# local y,s
if x > 100000:
return "Number too large"
for y in range(x+1):
The turtle is a small robot that moves following the user commands,
it will trace the moves with a pen with a selectable color. It may
be used to learn programming.
Click on Prog then Turtle then new
Two levels are created, the first one is for programs/functions that
will be used to make a figure, the second field begins with the
command clearscreen, it will contain the move commands, including
calls to functions defined in the first level.
At the right of the new button, you can select move commands,
(turtle moves forward n steps, default n=10),
(right n degrees, default n=90), etc.
For example, click on the line after clearscreen,
then forward then tleft, press Enter, the turtle
moves 10 pixels left and will turn left, heading to the top.
The first field is a normal level where you can write utilities
with the help of the prog assistants (test, loop, func).
Example: square, regular polygons
Merry Xcas (Python version)
The French turtle
manual explain all these commands and contains many examples
of scenarios to teach programming to young childrens.