5 Ways to Calculate Inverse Tan in Microsoft Excel

Do you work with real-world scenarios of physics and engineering? Is calculating angles in right-angle triangles, figuring out surface slopes, or the geospatial position of objects, etc., the routine tasks at work?

Then you must learn how to do tan inverse in Excel.

When you need to solve complex mathematical problems at work or school, there is no better software than Microsoft Excel. It comes with more than 90 out-of-the-box functions for mathematics and trigonometry.

Besides solving complex mathematical and trigonometrical problems, you can also create calculator programs in Excel to calculate tan inverse in Excel.

Read this article until the end to learn how to calculate the inverse tangent in Excel using manual and automatic methods.

What Is Tan Inverse?

The inverse tan is the inverse function of the tangent of an acute angle in a right-angle triangle. In trigonometry, the tan inverse function is often denoted as tan^(-1) or atan or arctan.

Since the cotangent (cotθ) of an acute angle of a right-angle triangle is 1/tanθ. Hence, inverse tan is also equal to the cotangent of the given acute angle.

The tangent of an acute angle is the ratio of the length of the opposite and adjacent sides in a right-angle triangle. Therefore, if these values are available, you can get the ratio or tangent. Then, you can use this ratio to know the angle value of the acute angle in radians or degrees.

Mathematically, if tan^(-1)(x) represents the tangent inverse function, then it’s defined as tan^(-1)(x) = y.

Here, x is the ratio of the length of the opposite and adjacent sides of a given acute angle in a right-angle triangle. On the other hand, y is the measure of the angle in radians or degrees.

Reasons to Calculate Inverse Tan

The tangent inverse function is widely used in trigonometry, geometry, engineering, physics, and various fields where angles and angular measurements are involved. Find below some major applications of this trigonometrical function:

  1. An inverse tangent is commonly used in trigonometry to find angles from given side ratios in right-angled triangles, which is essential for solving various real-world problems.
  2. Tan inverse in Excel is used to analyze slopes, gradients, and angles in fields like engineering, physics, surveying, and astronomy.
  3. You can also use inverse tan in Excel to analyze trends and patterns in data, especially when dealing with slopes or angles in scatter plots.
  4. You must calculate inverse tan to solve for azimuths, bearings, and directions in geospatial applications and navigation systems.
  5. When you need to convert Cartesian coordinates to polar coordinates and perform complex number operations, you should know how to do inverse tan in Excel.
  6. By learning to calculate inverse tan in Excel, you can determine phase angles in electrical circuits and signal processing.

So far, you learned the basics of the inverse tan function. Furthermore, you found out why you must learn how to find inverse tan in Excel. Now, keep reading to explore the best methods to calculate inverse tan in Excel.

Create a Tan Inverse Calculator Using ATAN Function

The ATAN function of Excel enables you to find arctan from the given tangent of an acute angle in a right-angle triangle. You can also use the same function to calculate inverse tan when you have the length values of the opposite and adjacent sides of the respective acute angle.

Find below the quick steps to build a tan inverse calculator. You can place the calculator in your Excel workbook where you often need to solve various trigonometric functions including arctan.

Get Arctan From Triangle Side Lengths

Using ATAN
  1. Create the necessary column headers in your Excel worksheet, like Opposite Side (a), Adjacent Side (b), Arctan (Radians), and Arctan (Degrees).
  2. Populate the columns for Opposite Side and Adjacent Side with the real-world triangle side lengths in any unit, like centimeters (cm), inches (inch), etc.
  3. Now, select the first row of the column header Arctan (Radians) or column C and enter the following formula:
=ATAN(A2/B2)
  1. In the above formula, A2 is the value for the Opposite Side and B2 represents the value for the Adjacent Side. So, adjust the formula in your workbook according to your own dataset.
  2. Hit Enter to get the tan inverse in Excel in radians.
Using fill handle

Use the fill handle to apply the formula to all the rows under column Arctan (Radians).

Inverse tan in degrees

To get the tan inverse value in degrees, use the following formula in the first row under the column Arctan (Degrees) or column D:

=DEGREES(ATAN(A2/C2))

Just like the previous formula, drag the fill handle down the column to calculate the inverse tan for the whole column.

Now, to use the worksheet as a calculator template for tan inverse, lock the formula fields by following these steps:

Protecting formulas
  1. Highlight all the rows in the worksheet that have formulas.
  2. Hit Ctrl + 1 and go to the Protection tab.
  3. Checkmark the Locked checkbox and click OK.
Unprotect data entry cells
  1. Now, highlight the rows for Opposite Side and Adjacent Side values.
  2. Press Ctrl + 1 and navigate to the Protection tab.
  3. Uncheck the Locked checkbox and select OK.
  1. Now, go to the Review tab on the Excel ribbon.
  2. Click the Protect Sheet button inside the Protect block.
Protect Sheet
  1. Keep the default selection as is on the Protect Sheet dialog box.
  2. Type in a password so no one can unlock the formula cells other than you.
  3. Click OK to finalize the cell protections.

Now, anyone can input the respective values in columns A and B to get the corresponding inverse tan in radians and degrees in columns C and D.

Get Arctan From Tangent

Inverse tan from tangent
  1. Suppose, you got tangent values of acute angles in column A (Tan).
  2. Create the Arctan (Radians) and Arctan (Degrees) column headers in columns B and C.
  3. Enter the following formula into the first row below column B:
=ATAN(A2)
Using DEGREE function
  1. Similarly, for column C, use the following formula in the first row:
=DEGREES(ATAN(A2))
inverse tan in Excel using the ATAN function
  1. Hit Enter to get the respective inverse tan values in radians and degrees.
  2. Now, use the fill handle to apply the formulas to the rest of the rows below the selected columns.
  3. Excel will automatically populate the tan inverse values for all the rows you selected.

Lock the rows below columns B and C using the worksheet protection method mentioned earlier. However, keep the rows below column A open for data entry. When you enter new tan values, Excel will update columns B and C automatically.

Calculate Inverse Tan Using Power Query

Are you importing thousands of tangent values of acute angles to an Excel worksheet from a third-party database? Is getting tan inverse in Excel your ultimate goal?

Then, use the Power Query tool to convert the same within Power Query to inverse tan. Now, you can load the converted values as a column in Excel. Moreover, you can also use this method to convert tangent values to inverse tan values in the local worksheet.

Here are the complete instructions you should follow:

Importing third-party data
  1. Click the Data tab on Excel and select Get Data.
  2. On the context menu, choose a source database to load data to the Power Query tool.
Transform table and range
  1. Alternatively, select a column containing tangent values in the local worksheet and click From Table/Range in the Data tab.
Adding new column
  1. On the Power Query tool, click the Add Column tab on the ribbon.
  2. Click the Custom Column button.
  3. In the Custom Column wizard, enter a name for the new column.
  4. In the Custom column formula field, copy and paste the following formula:
=Number.Atan([Tan])
  1. [Tan] in the formula represents the entire column containing the tangent values.
  2. Click OK and you should see the inverse tan values as radians in the new column.
How to do tan inverse in Excel using power query
Converting radians to degrees in Excel
  1. To get degrees, click the Custom Column button.
  2. Type a name for the custom column and enter the following formula in the functions field:
=([Arctan])*(180/Number.PI)
  1. [Arctan] is the column containing inverse tangent in radians.
  2. Click OK to convert radians to degrees.
Converting radians to degrees in Excel
  1. Now, click the File menu and choose the Close & Load To option.
Import data to the worksheet
  1. On the Import Data dialog box, click Existing worksheet and highlight the destination cell.
  2. Click OK to complete the inverse tan value import process.
Tan inverse calculator on power query

Find Tan Inverse in Excel Using Power Pivot

If you’re working with large data models, you might want to use Power Pivot to do tan inverse in Excel. Find below the step-by-step instructions:

Add tangent values to the data model
  1. Highlight the entire column that contains input tangent values.
  2. Click the Power Pivot tab on the Excel ribbon.
  3. Hit the Add to Data Model button to add the tangent values to the Power Pivot editor.
Applying formula in Power Pivot
  1. Now, double-click the Add Column text and rename it to Arctan Degrees.
  2. Click the column header to activate the formula bar.
  3. Into the formula bar, copy and paste the following formula:
=(ATAN([Tan])*(180/Pi()))
  1. Power Pivot will quickly populate the Arctan Degrees column with inverse tan values in degrees.
Copy column from Power Pivot
  1. Right-click on the column and click Copy.
  1. Go to the worksheet and highlight a cell to copy the column.
  2. Press Ctrl + Alt + V to bring up the Paste Special dialog box.
  3. Select the CSV option and click OK.
Calculate tan inverse using Power Pivot

Excel will quickly import the inverse tan values to the destination worksheet.

Power Pivot is available as a tab in modern Excel desktop apps like Excel for Microsoft 365, Excel 2021, Excel 2019, etc.

If you’re using a dated Excel app, like Excel 2010, you must activate it as an Excel add-in from the Developer tab > COM Add-ins section.

Create a Tan Inverse Calculator Using Excel VBA

So far, you learned several manual methods to do inverse tan in Excel. What if you need to automate the process for thousands of entries of tangent values? What if you need to add the process as automation to another long workflow in Excel VBA?

In such situations, you can use the following Excel VBA script. You’ll also find below the instructions to implement the script:

Creating an Excel VBA code
  1. Hit Alt + F11 to bring up the Excel VBA Editor.
  2. Click the Insert button on the menu bar and choose Module.
  3. In the blank module, copy and paste the following VBA script:
Sub CalculateInverseTanInDegrees()
    Dim ws As Worksheet
    Set ws = ThisWorkbook.Sheets("Sheet4")
    
    Dim rngInput As Range
    Set rngInput = ws.Range("A2:A4")
    
    Dim rngOutput As Range
    Set rngOutput = ws.Range("B2:B4")
    
    Dim resultFormula As String
    
    resultFormula = "=DEGREES(ATAN(RC[-1]))"
    
    rngOutput.FormulaR1C1 = resultFormula
End Sub
  1. Click the Save button.
  2. Close Excel VBA Editor by pressing Alt + Q keys.
Running macro in Excel
  1. Press Alt + F8 to call the Macro dialog box.
  2. Select the CalculateInverseTanInDegrees macro.
  3. Click the Run button.

Excel will convert all referred tangent values in the worksheet into cell range A2:A4 and place the results in the cell range B2:B4.

If your dataset doesn’t fit the above VBA script composition, here’s how you can customize the code:

  • "Sheet4" should be changed to the exact worksheet name where you’re doing the conversion.
  • "A2:A4" should be changed to the exact cell range where tangent values exist on the worksheet.
  • Similarly, you must also edit "B2:B4" according to the destination cell range as per your worksheet.
  • Ensure the tangent values are in the immediate left-side column of the destination cell range. For example, If the destination cell range is "F2:F4", then the tangent source should be "E2:E4".

Get Inverse Tan in Excel Using Office Scripts

Suppose, you’d like to automate the tan inverse in Excel on the web app. Then, you’d need to use Office Scripts since Excel VBA doesn’t work on the online version of Excel. Find below the steps you need to follow:

Calculate inverse tan using Office Scripts
  1. Navigate to the Automate tab on Excel.
  2. Click the New Script button.
  3. Now, copy and paste the following Office Scripts code into the Code Editor panel:
function main(workbook: ExcelScript.Workbook) {
	let selectedSheet = workbook.getActiveWorksheet();
	// Set range B2 on selectedSheet
	selectedSheet.getRange("B2").setFormulaLocal("=DEGREES(ATAN(A2))");
	// Paste to range B3:B6 on selectedSheet from range B2 on selectedSheet
	selectedSheet.getRange("B3:B6").copyFrom(selectedSheet.getRange("B2"), ExcelScript.RangeCopyType.all, false, false);
}
  1. Click the Save script button.
  2. Now, hit the Run button to automatically calculate the inverse tan from the source cell range.

To make the above script work on your worksheet, follow these instructions:

  • Change all the occurrences of B2 to the first cell where you’ll start the inverse tan process.
  • Similarly, change A2 to the cell reference which is the first row in the tangent-values column.
  • Change the cell range B3:B6 to the destination cell range just after the first cell where you applied the ATAN formula.

Find below the conditions for using Office Scripts:

  • You got Microsoft 365 Business Standard or a better subscription.
  • You’re using Excel for the web or Excel for Microsoft 365 app.
  • If using the Excel desktop app, you must be connected to the internet.

Conclusions

By learning how to do tan inverse in Excel, you can show others at school or work how proficient you are in Excel. Also, employers and HR managers consider such Excel skills as valuable problem-solving skills for you as a job seeker.

Not to mention, you can quickly and accurately calculate inverse tan. These methods are much more efficient and time-saving than solving for tan inverse in a pen and paper or using graph paper.

Try all or some of the above methods to find inverse tan in Excel according to your Excel expertise level and the scenario you’re solving.

Don’t forget to leave a comment below to express your experience while following along with the above methods.

About the Author

Bipasha Nath

Bipasha Nath

Bipasha is a technical content writer with 10+ years of experience in the technology industry. She previously worked in a SaaS software development company focused on SharePoint, OneDrive, Word, Excel, Word solutions.

Related Posts

Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get the Latest Microsoft Excel Tips

Follow Us

Follow us to stay up to date with the latest in Microsoft Excel!

Subscribe for awesome Microsoft Excel videos 😃