ATAN returns the arctangent of a number, which is the angle whose tangent equals that number, measured in radians. Use it to turn a slope ratio or tangent value back into an angle for geometry, navigation, or engineering calculations.
=ATAN(number)What does ATAN do?
The ATAN function is Excel's inverse tangent. Give it a number and it returns the angle whose tangent is that number, expressed in radians. Radians are the natural angle unit in mathematics: a full circle is 2π radians, so a right angle is about 1.5708 radians. If you prefer degrees, wrap the result in DEGREES, for example =DEGREES(ATAN(1)) returns 45.
ATAN matters whenever you have a ratio of two sides of a right triangle and need the angle between them. Surveyors, engineers, analysts, and students all meet this situation: a ramp's rise over run, a roof pitch, a line's slope on a chart, or a direction from a set of coordinates. Instead of reaching for a scientific calculator, you can keep the whole calculation in the spreadsheet and update it automatically when the inputs change.
A typical office scenario is a facilities team checking accessibility ramps. They record the rise and run of each ramp in a table. A single ATAN formula converts each rise/run ratio into an angle in degrees, and conditional formatting flags any ramp that exceeds the allowed slope. The same pattern works for roof pitches, road gradients, or camera tilt angles.
When to use ATAN
- Convert a slope ratio (rise divided by run) into an angle in degrees.
- Find the direction angle between two points from their coordinate differences.
- Calculate the pitch of a roof or the gradient of a road from measurements.
- Determine the tilt or elevation angle in engineering and physics homework.
- Check accessibility ramp compliance by comparing the computed angle to a limit.
- Reverse a TAN calculation when you know the tangent value but need the angle.
ATAN syntax
=ATAN(number)| Argument | Required? | What to enter |
|---|---|---|
number | Required | The tangent value you want the angle for. It can be any real number, positive, negative, or zero. For a slope, enter rise divided by run, such as =ATAN(B2/C2). |
What it returns: A number in radians between -π/2 and π/2 (approximately -1.5708 to 1.5708), representing the angle whose tangent is the input. The result is positive for positive inputs, negative for negative inputs, and zero for zero.
ATAN examples
1 Basic arctangent of a single value
This example shows the raw behaviour of ATAN on a few familiar tangent values. The goal is to see how the function maps a number to an angle in radians. Column B holds the tangent value, and the formula =ATAN(B2) in column C returns the angle in radians. Column D converts that to degrees with =DEGREES(C2) so the result is easier to read. Notice that ATAN(1) gives 0.7854 radians, which is 45 degrees.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Tangent value | Tangent value | Angle (radians) | Angle (degrees) | |||
| 2 | Zero | 0 | 0.7853981634 | ||||
| 3 | One | 1 | |||||
| 4 | Square root of 3 | 1.732050808 | |||||
| 5 | Negative one | -1 | |||||
| 6 |
2 Convert a ramp slope to an angle
A facilities team measures the rise and run of several wheelchair ramps and wants the incline angle in degrees. The goal is to turn each rise/run ratio into an angle. The formula =DEGREES(ATAN(B2/C2)) divides rise by run, passes the ratio to ATAN, and converts the radians to degrees. For the first ramp, 0.5 divided by 6 is about 0.08333, whose arctangent is about 4.76 degrees. The result makes it easy to compare each ramp against a maximum allowed angle.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Ramp | Rise (m) | Run (m) | Angle (degrees) | |||
| 2 | Front entrance | 0.5 | 6 | 4.763641691 | |||
| 3 | Side entrance | 0.3 | 5 | ||||
| 4 | Back entrance | 0.75 | 8 | ||||
| 5 | Parking ramp | 0.4 | 7 | ||||
| 6 |
3 Find the direction angle between two points
A delivery coordinator has two locations with east and north offsets from a depot and wants the bearing angle of the straight line between them. The goal is to compute the angle from the horizontal using the coordinate differences. The formula =DEGREES(ATAN((D2-B2)/(C2-A2))) subtracts the starting coordinates from the ending coordinates, divides the north change by the east change, and converts the arctangent to degrees. For the first pair, the east change is 4 and the north change is 3, so the ratio is 0.75 and the angle is about 36.87 degrees. This gives the line's elevation above the horizontal, not a compass bearing, which would need extra logic for each quadrant.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Start East | Start North | End East | End North | Angle (degrees) | ||
| 2 | 0 | 0 | 4 | 3 | 36.86989765 | ||
| 3 | 1 | 2 | 6 | 5 | |||
| 4 | 2 | 1 | 9 | 7 | |||
| 5 |
4 Check roof pitch against a limit
A property manager records the rise and run of several roof sections and needs to know whether each pitch exceeds a 30-degree limit. The goal is to compute the pitch angle and compare it to the limit. The formula =IF(DEGREES(ATAN(B2/C2))>30,"Review","OK") calculates the angle in degrees and returns Review when it is above 30, otherwise OK. For the first roof, 3 divided by 5 is 0.6, whose arctangent is about 30.96 degrees, so it is flagged for review. The second roof, 2 divided by 4, gives about 26.57 degrees and passes.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Roof section | Rise (m) | Run (m) | Status | |||
| 2 | North wing | 3 | 5 | Review | |||
| 3 | South wing | 2 | 4 | ||||
| 4 | Main hall | 4 | 6 | ||||
| 5 | Annex | 1 | 3 | ||||
| 6 |
5 Average slope angle across survey lines
A survey team has several line segments with horizontal and vertical distances and wants the average slope angle in degrees. The goal is to compute each segment's angle and then average them. The formula =DEGREES(ATAN(AVERAGE(B2:B5)/AVERAGE(C2:C5))) first averages the vertical distances and the horizontal distances, then divides one average by the other and converts the arctangent to degrees. This gives the angle of the average slope rather than the average of the individual angles, which is a subtle but useful distinction. The average vertical distance is 2.5 and the average horizontal distance is 5, so the ratio is 0.5 and the angle is about 26.57 degrees.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Segment | Vertical (m) | Horizontal (m) | ||||
| 2 | A-B | 2 | 4 | 26.56505118 | |||
| 3 | B-C | 3 | 6 | ||||
| 4 | C-D | 1 | 3 | ||||
| 5 | D-E | 4 | 7 | ||||
| 6 |
Common ATAN errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #VALUE! | The number argument is text that cannot be converted to a number, such as a cell containing the word slope. | Make sure the cell contains a numeric value. Use ISNUMBER to test, or clean the data with VALUE or TRIM before passing it to ATAN. |
| #DIV/0! | You divided by a run or horizontal distance that is zero, so ATAN receives an error instead of a number. | Guard the division with IFERROR or check the denominator, for example =IF(C2=0,"Vertical",DEGREES(ATAN(B2/C2))). |
| Wrong angle unit | ATAN returns radians, but you expected degrees, so the result looks far too small. | Wrap the formula in DEGREES, for example =DEGREES(ATAN(B2/C2)). |
| #NUM! | The argument is an extremely large number outside Excel's numeric limits, often caused by a broken ratio. | Check the source cells for outliers or text that was coerced into a huge number, and correct the input. |
Tips for using ATAN
- Remember that ATAN always returns radians. Use
DEGREESfor a human-friendly angle andRADIANSwhen feeding degrees back into a trigonometric function. - For a slope, compute rise divided by run inside the formula, such as
=ATAN(B2/C2), rather than pre-calculating the ratio in a helper column. - ATAN only covers angles from -90 to 90 degrees. If you need a full 0–360 direction from coordinates, use
ATAN2(x,y)instead. - Use
ROUND(DEGREES(ATAN(B2/C2)),1)when you want tidy one-decimal angles for reports. - Test your formula with a known 45-degree case: any ratio of 1 should return 0.7854 radians or 45 degrees.
Frequently asked questions
Does ATAN return degrees or radians?
ATAN returns radians. To get degrees, wrap the result in the DEGREES function, for example =DEGREES(ATAN(1)) returns 45.
What is the difference between ATAN and ATAN2?
ATAN takes a single tangent value and returns an angle between -90 and 90 degrees. ATAN2 takes separate x and y values and returns an angle across the full circle, which is better for directions between two points.
Can ATAN handle negative numbers?
Yes. A negative input returns a negative angle, so =ATAN(-1) returns about -0.7854 radians, or -45 degrees.
Why does ATAN of a slope give a small angle?
Small slopes have small tangent values, and the arctangent of a small number is a small angle. For example, a rise of 1 over a run of 100 gives about 0.57 degrees, which is correct for a gentle slope.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. ATAN reference