You are on page 1of 5

280 Part II: Using Functions in Your Formulas

Area, Surface, Circumference, and Volume


Calculations
This section contains formulas for calculating the area, surface, circumference, and volume for
common two- and three-dimensional shapes.

Calculating the area and perimeter of a square


To calculate the area of a square, square the length of one side. The following formula calculates
the area of a square for a cell named side:

=side^2

To calculate the perimeter of a square, multiply one side by 4. The following formula uses a cell
named side to calculate the perimeter of a square:

=side*4

Calculating the area and perimeter of a rectangle


To calculate the area of a rectangle, multiply its height by its base. The following formula returns
the area of a rectangle, using cells named height and base:

=height*base

To calculate the perimeter of a rectangle, multiply the height by 2 and then add it to the width
multiplied by 2. The following formula returns the perimeter of a rectangle, using cells named
height and width:

=(height*2)+(width*2)

Calculating the area and perimeter of a circle


To calculate the area of a circle, multiply the square of the radius by Π. The following formula
returns the area of a circle. It assumes that a cell named radius contains the circle’s radius:

=PI()*(radius^2)

15_475362-ch10.indd 280 4/14/10 10:13 PM


Chapter 10: Miscellaneous Calculations 281

The radius of a circle is equal to one-half of the diameter.


To calculate the circumference of a circle, multiply the diameter of the circle by Π. The following
formula calculates the circumference of a circle using a cell named diameter:

=diameter*PI()

The diameter of a circle is the radius times 2.

Calculating the area of a trapezoid


To calculate the area of a trapezoid, add the two parallel sides, multiply by the height, and then
divide by 2. The following formula calculates the area of a trapezoid, using cells named parallel
side 1, parallel side 2, and height:

=((parallel side 1+parallel side 2)*height)/2

Calculating the area of a triangle


To calculate the area of a triangle, multiply the base by the height and then divide by 2. The fol-
lowing formula calculates the area of a triangle, using cells named base and height:

=(base*height)/2

Calculating the surface and volume of a sphere


To calculate the surface of a sphere, multiply the square of the radius by Π and then multiply by 4.
The following formula returns the surface of a sphere, the radius of which is in a cell named radius:

=PI()*(radius^2)*4

To calculate the volume of a sphere, multiply the cube of the radius by 4 times Π and then divide
by 3. The following formula calculates the volume of a sphere. The cell named radius contains the
sphere’s radius.

=((radius^3)*(4*PI()))/3

15_475362-ch10.indd 281 4/14/10 10:13 PM


282 Part II: Using Functions in Your Formulas

Calculating the surface and volume of a cube


To calculate the surface area of a cube, square one side and multiply by 6. The following formula
calculates the surface of a cube using a cell named side, which contains the length of a side of
the cube:

=(side^2)*6

To calculate the volume of a cube, raise the length of one side to the third power. The following
formula returns the volume of a cube, using a cell named side:

=side^3

Calculating the surface and volume of a cone


The following formula calculates the surface of a cone (including the surface of the base). This
formula uses cells named radius and height:

=PI()*radius*(SQRT(height^2+radius^2)+radius))

To calculate the volume of a cone, multiply the square of the radius of the base by Π, multiply by
the height, and then divide by 3. The following formula returns the volume of a cone, using cells
named radius and height:

=(PI()*(radius^2)*height)/3

Calculating the volume of a cylinder


To calculate the volume of a cylinder, multiply the square of the radius of the base by Π and then
multiply by the height. The following formula calculates the volume of a cylinder, using cells
named radius and height:

=(PI()*(radius^2)*height)

15_475362-ch10.indd 282 4/14/10 10:13 PM


Chapter 10: Miscellaneous Calculations 283

Calculating the volume of a pyramid


Calculate the area of the base, multiply by the height, and then divide by 3. This formula calcu-
lates the volume of a pyramid. It assumes cells named width (the width of the base), length (the
length of the base), and height (the height of the pyramid).

=(width*length*height)/3

Solving Simultaneous Equations


This section describes how to use formulas to solve simultaneous linear equations. The following
is an example of a set of simultaneous linear equations:

3x + 4y = 8
4x + 8y = 1

Solving a set of simultaneous equations involves finding the values for x and y that satisfy both
equations. For this set of equations, the solution is as follows:

x = 7.5
y = –3.625

The number of variables in the set of equations must be equal to the number of equations. The
preceding example uses two equations with two variables. Three equations are required to solve
for three variables (x, y, and z).
The general steps for solving a set of simultaneous equations follow. See Figure 10-3, which uses
the equations presented at the beginning of this section.

1. Express the equations in standard form. If necessary, use simple algebra to rewrite the
equations such that the variables all appear on the left side of the equal sign. The two
equations that follow are identical, but the second one is in standard form:
3x –8 = –4y
3x + 4y = 8

2. Place the coefficients in an n x n range of cells, where n represents the number of equa-
tions. In Figure 10-3, the coefficients are in the range I2:J3.
3. Place the constants (the numbers on the right side of the equal sign) in a vertical range
of cells. In Figure 10-3, the constants are in the range L2:L3.

15_475362-ch10.indd 283 4/14/10 10:13 PM


284 Part II: Using Functions in Your Formulas

4. Use an array formula to calculate the inverse of the coefficient matrix. In Figure 10-3, the
following array formula is entered into the range I6:J7. (Remember to press
Ctrl+Shift+Enter to enter an array formula.)
{=MINVERSE(I2:J3)}

5. Use an array formula to multiply the inverse of the coefficient matrix by the constant
matrix. In Figure 10-3, the following array formula is entered into the range J10:J11. This
range holds the solution.
{=MMULT(I6:J7,L2:L3)}

Refer to Chapter 14 for more information on array formulas. Chapter 16 demonstrates


how to use iteration to solve some simultaneous equations.

Figure 10-3: Using formulas to solve simultaneous equations.

You can access the workbook, simultaneous equations.xlsx, shown in Figure


10-3, on the companion CD-ROM. This workbook solves simultaneous equations with
two or three variables.

Rounding Numbers
Excel provides quite a few functions that round values in various ways. Table 10-1 summarizes
these functions.

It’s important to understand the difference between rounding a value and formatting a
value. When you format a number to display a specific number of decimal places, for-
mulas that refer to that number use the actual value, which may differ from the dis-
played value. When you round a number, formulas that refer to that value use the
rounded number.

15_475362-ch10.indd 284 4/14/10 10:13 PM

You might also like