Google Sheets TAN Function: A How-To Guide
In this article
The TAN function in Google Sheets returns the tangent of an angle given in radians. To use it, type =TAN(angle) into a cell, replacing angle with the radian value or a cell reference that contains it. If your angle is in degrees, wrap it in the RADIANS function like this: =TAN(RADIANS(45)). That is the whole answer; the rest of this guide covers setup, examples, pitfalls and fixes so you can use it confidently.
What You'll Need
- A Google account with access to Google Sheets (the free web version or the mobile app).
- A spreadsheet open and ready for editing.
- Your angle values, either in radians or degrees. If they are in degrees, you will convert them with RADIANS.
Step-by-Step
- Open your spreadsheet. Go to sheets.google.com, sign in, and open an existing file or create a new blank spreadsheet. The steps below work the same on desktop and in the Google Sheets mobile app, though the formula bar is easier to use on a computer.
- Click the cell where you want the result. Pick an empty cell. The result of TAN will appear there as a number.
- Start the formula. Type an equals sign
=to tell Sheets you are entering a formula, then typeTAN(. You can also type=TANand select the function from the autocomplete list that appears. - Enter the angle in radians. Type the radian value directly, for example
=TAN(1), or click a cell that holds the value, for example=TAN(A2). Close the parenthesis with). - Press Enter. The cell shows the tangent of that angle. For example,
=TAN(1)returns approximately 1.5574. - Convert degrees if needed. If your angle is in degrees, do not type it directly into TAN. Instead use
=TAN(RADIANS(45)), which returns approximately 1. RADIANS converts degrees to radians, which is what TAN expects. - Copy the formula down a column. If you have a list of angles in column A, put
=TAN(A2)in B2, then drag the fill handle (the small square at the bottom-right of the cell) down to apply it to the rest of the list. Relative references adjust automatically. - Format the result if you like. Select the result cells and use the number format buttons in the toolbar (for example, increase decimal places) to show more or fewer digits. This does not change the underlying value.
Common Mistakes
- Feeding degrees directly into TAN. TAN expects radians.
=TAN(45)does not return 1; it returns the tangent of 45 radians, which is about 1.6198. Always wrap degree values in RADIANS. - Forgetting the closing parenthesis. Sheets will usually offer to fix it, but check that every opening parenthesis has a matching closing one.
- Using a text value. If the referenced cell contains text like "45°" instead of a number, TAN returns an error. Keep angle cells as plain numbers.
- Expecting exact values at 90°. The tangent of 90 degrees is undefined mathematically. Because of floating-point rounding,
=TAN(RADIANS(90))returns a very large number rather than an error. Treat that result as undefined, not as a real value. - Confusing TAN with ATAN. TAN gives the tangent of an angle; ATAN gives the angle whose tangent is a given number. They are inverse operations, not interchangeable.
Tips
- Use cell references instead of hard-coded numbers so you can change the angle and see the result update instantly.
- Combine TAN with other trig functions. For example,
=SIN(A2)/COS(A2)gives the same result as=TAN(A2)and can help you cross-check your work. - If you work in degrees throughout, consider adding a helper column that converts degrees to radians once, then reference that column in your TAN formulas. It keeps formulas shorter and easier to audit.
- Remember that TAN repeats every π radians (180 degrees), so results for angles outside the principal range can look surprising. That is normal periodic behavior, not an error.
- Use the formula bar to inspect a formula if a cell shows an unexpected number; it is easy to accidentally reference the wrong cell.
Troubleshooting
If TAN does not give the result you expect, work through these checks in order.
- Check for a #VALUE! error. This usually means the argument is text or a cell containing text. Select the referenced cell and confirm it holds a number, not a label.
- Check for a #NAME? error. This means Sheets does not recognize the function name. Make sure you typed
TANand not a misspelling, and that you are using an equals sign at the start. - Recheck your units. If the result is wildly off, you probably passed degrees where radians were expected. Wrap the value in RADIANS and compare.
- Look for hidden characters. If you pasted values from another source, they may contain spaces or non-breaking characters. Retype the number manually to test.
- Verify the cell reference. Click the cell with the formula and look at the formula bar. If it references the wrong cell, correct it or drag the formula again.
- Test with a known value. Enter
=TAN(0)in an empty cell. It should return 0. If it does not, the problem is with the sheet or the formula entry, not your angle data. - If the sheet itself seems broken, reload the page or reopen the file. If the problem persists, try the formula in a new blank spreadsheet to isolate whether the issue is file-specific.
Frequently Asked Questions
Does TAN in Google Sheets use degrees or radians?
It uses radians. To use degrees, convert them first with the RADIANS function, for example =TAN(RADIANS(30)).
Why does TAN(90 degrees) not return an error?
The tangent of 90 degrees is undefined, but floating-point rounding means Sheets returns a very large number instead of an error. Treat that output as undefined rather than a usable value.
Can I use TAN on a range of cells at once?
TAN takes a single argument. To apply it to a list, enter the formula in one cell and drag it down, or use ARRAYFORMULA with a range, for example =ARRAYFORMULA(TAN(A2:A10)).
What is the difference between TAN and ATAN?
TAN returns the tangent of an angle. ATAN returns the angle whose tangent is the given number. They are inverse functions.
Does TAN work in the Google Sheets mobile app?
Yes. The function is the same on mobile; type it into the formula bar or use the function list. The layout differs slightly from desktop, but the syntax does not change.
Can TAN return a negative number?
Yes. Tangent is negative for angles in the second and fourth quadrants (for example, between 90 and 180 degrees, or between 270 and 360 degrees). A negative result is normal.