How-to guide

How to use a formula calculator with variables

Use a formula calculator with variables: store each input, type the formula once, then change a value and recalculate. Plus common formulas and Casio/TI keys.

5 minutesBy Hira Noor, mathematicianUpdated
Quick answerTo use a formula calculator with variables, store each input under a name (v := 20), type the formula once using those names, then change one variable and press Enter on the formula again. For a formula you use often, define it as a function, such as R(v, a) := v^2 sin(2a)/9.81, and call it with new values in one line: R(25, 45).

A formula calculator is any calculator that lets you write a formula with letters instead of numbers and evaluate it for different values. The ScientifiCalc scientific calculator works this way as a free online formula calculator: you name your inputs, write the formula once, and recalculate it as often as you like. This guide shows both methods, works one full example, gives a table of everyday formulas you can open in the calculator, and explains how to store a formula on a Casio or TI handheld.

How to reuse a formula with variables or a function

Retyping a long formula for every new input is slow and invites typing errors. A calculator with variables offers two ways around it:

Variables
Named values such as v, rate or x1. Assign one with v := 20 or 20 -> v; the STO key does the same for the current result, with a picker for the letters A to F, X and Y. A formula that uses the names picks up their current values every time it is evaluated.
Custom functions
A formula with named parameters, such as f(c) := 9c/5 + 32, called like a built-in function: f(100) returns 212. A function can have up to five parameters; the custom functions page covers the details.

Variables suit "what if" exploration, where you change one input and keep the rest. Functions suit repeated evaluation with completely different inputs, and they are the closest thing to saving a formula: the definition stays in the calculator until you delete it.

Worked example: the range of a projectile

On level ground and ignoring air resistance, an object launched at speed v and angle θ above the horizontal lands at a distance

R=v2sin(2θ)gR = \frac{v^2 \sin(2\theta)}{g}
Range of a projectile, with g = 9.81 m/s² near the Earth’s surface

For v = 20 m/s and θ = 35°, the calculation by hand is

R=202sin⁡70∘9.81=400×0.9396939.81≈38.32 mR = \frac{20^2 \sin 70^\circ}{9.81} = \frac{400 \times 0.939693}{9.81} \approx 38.32 \text{ m}

Now suppose you want to compare several launch angles. Here is how to do it without retyping the formula. The calculator must be in degree mode (the default, shown as DEG in the status bar), because the angles are in degrees.

  1. Store the inputs

    Enter v := 20, g := 9.81 and a := 35, pressing Enter after each. They appear in the Variables panel.

  2. Type the formula once

    Enter v^2 sin(2a)/g. The result, about 38.3157, matches the hand calculation.

  3. Change one input and re-evaluate

    Enter a := 45, then press Arrow Up until the formula is back in the line (or select it in the History panel) and press Enter. The range rises to about 40.7747 m.

  4. Repeat for other values

    With a := 30 and then a := 60, the formula gives about 35.3119 m both times, because sin 60° = sin 120°.

  5. Turn the formula into a function

    Enter R(v, a) := v^2 sin(2a)/9.81. Now R(20, 35) returns about 38.3157 and R(25, 45) returns about 63.7105, each in a single line.

The table shows the results side by side. Complementary angles (30° and 60°) give the same range, and 45° gives the longest throw, a pattern that is easy to spot once recalculating costs nothing.

Range for v = 20 m/s and g = 9.81 m/s²
Angle θR (m)
30°35.31
35°38.32
40°40.16
45°40.77
60°35.31

Common formulas to try in the formula calculator

Each link below opens the scientific calculator with the formula already defined as a function. Call it with your own values in the next line.

Everyday formulas written as calculator functions
FormulaVariablesType thisExample call and result
Area of a circle, A = πr²r = radiusA(r) := pi r^2A(5) = 78.5398
Compound interest, A = P(1 + r/n)ⁿᵗP = principal, r = annual rate, n = compounds per year, t = yearsFV(P, r, n, t) := P(1 + r/n)^(n t)FV(1000, 0.05, 12, 10) = 1647.01
Hypotenuse, c = √(a² + b²)a, b = the two shorter sideshyp(a, b) := sqrt(a^2 + b^2)hyp(5, 12) = 13
Kinetic energy, KE = ½mv²m = mass in kg, v = speed in m/sKE(m, v) := m v^2/2KE(1200, 25) = 375000 J
Celsius to Fahrenheit, F = 9C/5 + 32c = temperature in °CF(c) := 9c/5 + 32F(37) = 98.6
Projectile range, R = v² sin(2θ)/gv = speed, a = angle in degreesR(v, a) := v^2 sin(2a)/9.81R(25, 45) = 63.7105 m

The same pattern works with variables when you want to vary one input at a time. For compound interest, store P := 1000, r := 0.05, n := 12 and t := 10, enter P(1 + r/n)^(n t) to get 1647.01, then set t := 20 and recall the formula to get 2712.64.

How to store a formula on a Casio or TI calculator

Handheld scientific and graphing calculators have their own versions of the same two ideas. The key names below come from the manufacturers’ manuals; menus differ slightly between models, so check the manual for yours.

  • Casio scientific calculators (fx-991 and similar): the CALC key. Type an expression that uses variable letters, such as A×B÷2, and press CALC. The calculator asks for a value for each variable in turn and shows the result. Press CALC again to enter new values without retyping the expression.
  • Casio: store a value with STO. Enter the value, press SHIFT then RCL (STO), and press the variable letter. The calculator keeps the letters A, B, C, D, E, F, M, X and Y.
  • TI-83 Plus and TI-84 Plus: store a value with STO→. Enter the value, press STO→, press ALPHA and the letter, then ENTER. Any expression that uses the letter picks up its current value.
  • TI-84 Plus: keep a formula in Y=. Type the formula in terms of X in the Y= editor, for example Y1 = 9X/5 + 32. On the home screen, enter Y1(37) (Y1 is under VARS, Y-VARS, Function) to evaluate it for X = 37.

A browser calculator is easier for long formulas because you can use whole words as names, see every stored variable in a panel and read back the full history. On a handheld you are usually limited to single-letter variable names.

Why this beats retyping

  • Fewer typing errors. The formula is typed once and checked once.
  • Full precision. Stored values keep every digit, so nothing is rounded between steps.
  • A readable history. An entry such as v^2 sin(2a)/g records what was calculated, which a bare string of numbers does not.
  • Saved between visits. Variables and functions are kept in your browser’s local storage on this device, so they are still there next time.

Continue from a result

To use a result in a follow-up step, such as converting 38.3157 m to feet, press × on the keypad right after the result appears: the calculator inserts Ans first, so pressing ×, entering 3.28084 and pressing = gives about 125.71. Typing *3.28084 on the keyboard does the same. A typed leading - is different: it starts a negative number, so type Ans - 5 to subtract from the last result. The guide How to store and recall values covers Ans and the memory keys in more detail.

Common mistakes when writing formulas

  • Separate names with * or a space when they multiply: v^2 * sin(2a) or v^2 sin(2a). A run of letters such as va is read as v × a, unless you have stored a variable called va, in which case it means that variable.
  • Put parentheses around whole arguments, exponents and denominators. sin(2a)/g divides the sine by g, while sin(2a/g) takes the sine of 2a/g.
  • Names may contain letters, digits and underscores (rate, x1, v_0). Built-in names such as sin, pi and e cannot be reused, and lowercase x and y are kept for graphing, so store values under X, Y or a longer name such as x1.
  • Names are case-sensitive: A and a are different variables. A function also takes over its name, so after A(r) := pi r^2 a variable called A can no longer be read on its own.
  • Check the angle unit. In radian mode the same formula treats 35 as 35 radians and gives a meaningless range.

Store your inputs as variables, type the formula once, and recalculate as often as you like.

Open the scientific calculator

Frequently asked questions

What is a formula calculator?

A formula calculator lets you write a formula with named variables, such as v^2 sin(2a)/g, and evaluate it for any values you choose. The ScientifiCalc scientific calculator does this with stored variables and custom functions, so you type the formula once and only change the inputs.

How do I store a formula in a calculator?

Define it as a function with a name and parameters, for example A(r) := pi r^2, then call it with a value: A(5) returns 78.5398. On a Casio scientific calculator, type the expression with variable letters and press CALC; on a TI-84 Plus, type it in the Y= editor and evaluate it as Y1(value).

Do variables keep their values after I close the page?

Yes. Variables, custom functions, memory and history are stored in your browser’s local storage on this device. They are not synced to other devices or browsers, and clearing the site’s data removes them.

How do I change or delete a variable?

Assign a new value, for example a := 50, to overwrite it. To delete one, open the Variables panel and use its delete button, or choose Clear all to remove every variable and function.

What is the difference between a variable and Ans?

Ans always holds the most recent result and changes after every calculation. A named variable keeps its value until you change or delete it.

Can a function’s parameters have the same names as my variables?

Yes. Inside the function, the parameters take the values you pass in the call. In R(25, 45), v is 25 and a is 45 even if your stored v is still 20.

Tools used in this guide

Scientific Calculator

Type or tap expressions with exact fractions, memory, variables, constants and complex mode.