Subscripts and superscripts in Desmos use underscore and caret symbols
To write a subscript in Desmos, type an underscore _ before the character or number you want to make smaller and lower. To write a superscript, type a caret ^ before the character or number you want to make smaller and raised. Both symbols work in the expression editor on the main graphing page and in text labels.
Desmos reads these symbols as formatting instructions, not as mathematical operators. When you type x_1, Desmos displays it as x with a subscript 1. When you type x^2, Desmos displays it as x squared. The symbols themselves do not appear in the final output.
If you want multiple characters in a subscript or superscript, wrap them in curly braces. For example, x_{12} makes x with subscript 12, and 2^{n+1} makes 2 to the power of n plus 1. Without the braces, only the first character after the underscore or caret becomes subscript or superscript.
Key Takeaways
- Use underscore _ for subscripts and caret ^ for superscripts in any Desmos expression or text box.
- Wrap multiple characters in curly braces: x_{12} or 2^{n+1} to keep them together in the subscript or superscript.
- These symbols work the same way in the graphing editor, in text labels, and in table column headers.
- Subscripts and superscripts are purely visual formatting and do not change how Desmos interprets the math.
Using subscripts in variable names and sequences
Subscripts are most useful when you are working with sequences or lists of related variables. If you have multiple points or values, subscripts let you name them clearly: a_1, a_2, a_3 for the first, second, and third terms of a sequence. You can then write equations that reference these variables by their subscripted names.
In a table, you can use subscripts in the column header to label what each column represents. Type the header as x_i or y_n and Desmos will format it with the subscript. This makes it clear that each row contains a different value of the same variable.
When you define a subscripted variable in one line and use it in another, Desmos treats the whole thing—variable name plus subscript—as a single label. You can reference x_1 in a later expression, and Desmos will know you mean the specific variable you defined, not x times 1.
Using superscripts for exponents and powers
Superscripts in Desmos are most common for exponents. Instead of typing x**2 or x^2 as an operator, you can write x^2 with the caret symbol and Desmos will display it with a raised 2. Both notations calculate the same result, but the superscript version looks cleaner on the graph or in a label.
Superscripts also work for other raised text, like units or notation. If you want to write m^2 for square meters in a label, the caret symbol formats it correctly. You can also use superscripts for mathematical notation like f^{-1} for the inverse of function f, or x^{(n)} for the nth derivative.
When you use a caret in an expression that Desmos is meant to calculate—not just display—Desmos interprets it as exponentiation. The formatting and the math work together: y = 2^x both displays with a superscript and calculates 2 to the power of x.
Combining subscripts and superscripts
You can use both subscripts and superscripts on the same variable. Type the subscript first, then the superscript: x_1^2 creates x with subscript 1 and superscript 2. Desmos places the subscript below and to the right of the variable, and the superscript above and to the right, in standard mathematical notation.
If you need both subscripts and superscripts to contain multiple characters, use braces for each: x_{1}^{2} or a_{n+1}^{(k)}. The braces keep each part together without affecting the other. You can also write them in either order—superscript first or subscript first—and Desmos will format both correctly.
Subscripts and superscripts in text labels
Text labels in Desmos accept subscripts and superscripts using the same underscore and caret syntax. If you add a label to a point or curve, you can write "The value is x_1" and Desmos will display it with x subscript 1. The underscore and caret only format the character when ready following them unless you use braces.
In a text box, you can write longer expressions with multiple subscripts and superscripts. For example, "The formula is a_n = 2^n" will display with both the subscript and superscript formatted correctly. Desmos treats the formatting symbols as instructions and removes them from the final display.
Common mistakes and how to fix them
The most common mistake is forgetting braces when you want multiple characters in a subscript or superscript. If you type x_12, Desmos makes only the 1 subscript and leaves the 2 at normal size. Use x_{12} instead. The same applies to superscripts: 2^10 makes only the 1 superscript, so write 2^{10}.
Another mistake is using subscripts or superscripts in variable names that Desmos needs to calculate. If you define a function as f_1(x) = x + 2, Desmos treats f_1 as the function name and will accept it. However, if you later try to reference f_2, Desmos will not automatically know it is a different function—you have to define it separately. Subscripts are for display and naming, not for creating variations automatically.
If a subscript or superscript does not appear, check that you used the correct symbol. The underscore key is usually on the same key as the hyphen (shift + hyphen on most keyboards). The caret is shift + 6. If you accidentally used a hyphen or another character, the formatting will not work.
Frequently Asked Questions
Can I use subscripts and superscripts in the function name itself?
Yes. You can define a function as f_1(x) = x^2 and Desmos will accept it. The subscript becomes part of the function name, so you reference it as f_1 in other expressions. This is useful when you have multiple related functions you want to keep separate.
What if I want a subscript or superscript that is itself a variable?
Use braces and put the variable inside: x_{n} or 2^{n}. Desmos will format n as subscript or superscript and calculate its value when you use the expression. You can also nest operations: x_{n+1} or 2^{n-1} work correctly.
Do subscripts and superscripts change how Desmos does the math?
No. Subscripts are purely visual—they do not change the calculation. Superscripts with the caret symbol do represent exponentiation, but that is because the caret is the exponentiation operator, not because of the formatting. x^2 and x**2 calculate the same result.
Can I use subscripts and superscripts in table headers?
Yes. Type the header as x_1 or y^2 and Desmos will format it with subscript or superscript. This helps label columns clearly when you have multiple related variables or when you want to show that a column contains squared values.
What happens if I use an underscore or caret in a text label but do not want it to format?
Desmos will always interpret underscore and caret as formatting symbols in expressions and labels. If you need to display the symbol itself, you may need to work around it by using a different character or rephrasing the label. In most cases, the subscript or superscript formatting is what you want anyway.