Publishers of technology books, eBooks, and videos for creative people

# Numbers for iPad: Formulas and Functions

• Print
This chapter is from the book

## Elements of Formulas

Every formula uses some combination of the following elements :  The parts of a formula.

Equal sign (=). The formula keyboard auto-enters the equal sign required at the start of every formula, so there’s no danger of forgetting or deleting it.

Constants. Constants, also called literals or static values, are numbers, text, dates, times, durations, or Boolean (true/false) values. Constants are so called because they never change (unless you edit the formula).

Arithmetic operators. These operators do basic math. The unary operators work on only one numeric value (Table 4.1); the binary operators work on two values (Table 4.2).

#### Table 4.1 Time Unary Arithmetic Operators

 Operator Description Example Result - Reverses the sign (positive or negative) of a value 5 + -3 2 + Leaves a value unchanged (useful only rarely) 5 - +3 2 % Divides a value by 100 5% 0.05 (formatted as 5%)

#### Table 4.2 Binary Arithmetic Operators

 Operator Description Example Result + Adds two values 2 + 4 6 - Subtracts the second value from the first 2 - 4 -2 × Multiplies two values 2 × 4 8 ÷ Divides the first value by the second 2 ÷ 4 0.5 ^ Raises the first value to the power of the second 2 ^ 4 16

Cell references. These references point to the cell or range of cells whose values you need to do a calculation. For details, see “Understanding Cell References” and “Using Cell References” later in this chapter.

Comparison operators. These operators compare two values and return a Boolean (true/false) value depending on their relationship (equal, not equal, and so on). For details, see “Understanding Comparison Operators” and “Using Comparison Operators” later in this chapter.

Functions. Functions built into Numbers let you do a wide range of calculations. The TODAY function, for example, returns today’s date, and STDEV calculates the sample standard deviation of a range of numbers. For details, see “Understanding Functions” and “Using Functions” later in this chapter.