Contact

TAN in Google Sheets: Calculate Slopes and Check Near-Vertical Inputs

Math and trigonometry Intermediate Google Sheets

Use Sheets tangent with radian inputs, rise-to-run models, percentage slopes and explicit mathematical singularities.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: TAN returns the tangent of a radian angle. =TAN(45*PI()/180) is expected to return approximately 1, the rise/run ratio of a 45-degree slope.

Availability and version history

  • Introduced: original service launch date is not established by the official history reviewed; Sheets has no corresponding numbered desktop release in this guide.
  • Availability: documented in the rolling Google Sheets service; examples use an ordinary web spreadsheet and numeric cells.
  • Checked: October 14, 2026; official TAN reference. Documentation and independent calculations, without native Sheets execution or broader client certification.

Syntax and interpretation

=TAN(angle)

Google specifies radians. Use angle_in_degrees*PI()/180 or RADIANS when the source contains degrees. The output is a ratio; multiplying it by a horizontal run gives a rise only under the stated geometry.

Examples use English function names and a decimal-point locale. Keep angle units in column headings rather than relying on the visual format of a number.

Example 1: compare slope ratios

Enter degrees −30, 0, 30, 45, 60 in A2:A6. In B2 enter:

=TAN(A2*PI()/180)

Fill down. Expected ratios are approximately −0.577350269, 0, 0.577350269, 1, 1.732050808. A tangent magnitude greater than one is valid. The function is not bounded in the way sine and cosine are.

A negative ratio carries a signed slope direction. Do not remove that sign before deciding whether the task concerns an oriented change or an ordinary positive triangle length.

Example 2: derive a rise from a run

For a constructed horizontal run of 9 units and an angle of 30 degrees:

=9*TAN(30*PI()/180)

Expected rise: approximately 5.196152423 units. The 9 is the horizontal adjacent side, not the hypotenuse. Substituting a sloping length would describe a different calculation even if the answer looked plausible.

At the same angle, runs 3, 6, 9 produce expected rises 1.732050808, 3.464101615, 5.196152423. This proportionality is a useful control for copied references and scaling.

Advanced example: distinguish a 50-percent slope from 50 degrees

A 50-percent slope means a rise/run ratio of 0.5. Its angle is:

=ATAN(0.5)*180/PI()

Expected result: approximately 26.565051177 degrees. Applying TAN to the corresponding unconverted radian result reconstructs approximately 0.5. ATAN is the inverse operation for a slope ratio.

If a spreadsheet cell displays 50%, inspect that its stored numeric value is 0.5. A source containing 50 represents a different ratio; a formatting choice should not silently decide the model’s scale.

Periodicity and a near-vertical test

TAN at 30 and 210 degrees has the same expected ratio, approximately 0.577350269. A ratio therefore does not retain a unique full-circle direction. Use ATAN2 with the original coordinates when quadrant information is required.

Mathematically, tangent is undefined at 90 degrees plus any integer multiple of 180 degrees. The direct help page does not specify a complete native error policy for those inputs. An approximate pi can leave a tiny nonzero denominator and yield a large finite result; that does not turn an exact vertical slope into a valid finite ratio.

For permitted controls on either side, 88 degrees gives approximately 28.636253283, and 92 degrees gives approximately −28.636253283. A small angle change near vertical has a large effect and can reverse the sign.

Troubleshooting

Check units first, then whether the argument is close to a singularity and whether the input length actually represents a horizontal run. A formula-error wrapper cannot diagnose a wrong-unit calculation that still produces a finite number.

State any rejection tolerance as a worksheet policy. This guide does not impose a universal safe distance from vertical or certify native behavior at extreme inputs. Retain the original angle and use a model suitable for the intended application.

References and verification

Worked inputs are fictional and outputs independently calculated. Approximate values are rounded mathematical expectations, not captured native results. Imported types, extreme magnitudes and a complete error/coercion matrix remain outside the tests.