How to put a function in Desmos
Updated November 2026 · Sarkari Tools math team
To put a function in Desmos, type its name, the input in brackets, an equals sign and the formula: f(x) = x² − 4. Desmos graphs it straight away and remembers the name for later.
f(x)=x^2-4f(3)y=f(x-2)+1g(x)=2x+1Step by step
- Click the first expression line and type
f(x)=x^2-4. - To find a value, type
f(3)on a new line. Desmos shows 5. - To graph a transformation, type
y=f(x-2)+1, which shifts f right 2 and up 1. - Define a second function,
g(x)=2x+1, then combine them:f(g(x))orf(x)+g(x). - Use other names if you like: h(t), p(n) and so on.
Try it live
This graph is drawn by our free graphing calculator, which uses the same style of typing. Edit any line and the graph updates.
Common mistakes and tips
- Use * or a space for multiplication when it could be confused with a function name.
- Exponents need ^. Type x^2, not x2.
- Use brackets for functions like sin: sin(x), not sin x.
Frequently asked questions
How do I graph y = f(x) after defining f?
Defining f(x) already draws it. To draw a changed version, type y = f(…) with the change.
How do I find f(x) for many values at once?
Make a table with x₁ values and type f(x₁) as the second column’s header.
Can I define a function of two variables?
Yes, for example f(x,y)=x²+y², and use it in equations such as f(x,y)=9.
No Desmos? Use our free online graphing calculator
Our free online graphing calculator works in any browser with no sign-up, and it shows step-by-step working where it can.
More Desmos guides
- How to graph a circle on Desmos
- How to graph piecewise functions on Desmos
- How to graph polar coordinates on Desmos
- How to graph parametric equations on Desmos
- How to make a table on Desmos
- How to do regression on Desmos
- How to add a slider in Desmos
- How to connect points on Desmos
- How to restrict the domain (limit a function) in Desmos
- How to do derivatives in Desmos
- How to do limits in Desmos
- How to do a cube root on Desmos
- How to make a heart in Desmos
- How to find slope on Desmos
- How to convert a decimal to a fraction on Desmos
- How to use Desmos on the SAT
- How to make a box plot on Desmos
- How to do a subscript in Desmos
- How to graph inequalities on Desmos
- How to find the intersection of two graphs on Desmos
Desmos is a trademark of Desmos Studio PBC. Sarkari Tools is independent and not affiliated with or endorsed by Desmos. Our guides describe how to use the Desmos calculator; our own calculators are separate tools.