How to Use IMAGINARY Function in Excel (3 Examples)

Get FREE Advanced Excel Exercises with Solutions!

Imaginary numbers are often used for mathematical and scientific analysis. In this article, we will show you how you can use the Excel IMAGINARY Function. With the help of this function, you can find the coefficient of the imaginary portion. You will also get a complete idea about inserting complex numbers, extracting real coefficients, and some common and most-used complex number calculations.

Excel Imaginary Function

IMAGINARY Function Overview

  • Summary

The IMAGINARY function extracts the imaginary coefficient from the corresponding complex number in Excel.

  • Syntax

The syntax for the formula is:


  • Argument
Argument Required/Optional Value
inumber Required The complex number from which you want to get the imaginary coefficient
  • Output

Returns the imaginary coefficient of a complex number.

  • Available Versions

The IMAGINARY function is available in all versions of Excel.

Insert Complex Numbers with Real and Imaginary Parts in Excel

Let’s say, we have a dataset of some real and imaginary coefficients from which we want to form complex numbers.

Let’s check the procedure of inserting complex numbers first.

We can Insert Imaginary numbers in Excel using the COMPLEX function.

➤ Write the Following equation in the desired cell and



  • 1:- Real Coefficient
  • 2:- Imaginary Coefficient

thus, we get the Imaginary form.

Excel IMAGINARY Function

➤  Then press ENTER and the cell will show you the complex number by combining the real and imaginary portions with a suffix “i”.

But there is a drawback to this method. Each time you want to insert a complex number, you need to input the real and the imaginary portion each and every time. However, you can apply this procedure when you have to get the complex number directly.

There is another way also available if you have a list of real and imaginary portions. You can use the cell reference. Here, we have lists of real and imaginary portions.

You just have to use the cell reference of the real and imaginary parts.

➤ So, write the following Formula in the selected cell.



  • B5:- Real Coefficient
  • C5:- Imaginary Coefficient

➤ Now, press ENTER to let the cell show the result.

➤ Next, use the Fill Handle tool to Autofill the formula for the cells situated down to that cell.

Excel IMAGINARY Function

➤ Hence, you will get the complex numbers formed of your inserted real and imaginary part.

This IMAGINARY function takes a Complex number and returns its Imaginary Coefficient. In this section, we will see how the imaginary function can be used in Excel. I will discuss 3 examples of using the IMAGINARY function with proper illustrations here.

1. Extracting the Imaginary Coefficient Directly with the Imaginary Function

We have taken some Imaginary Numbers in column B.

And, we want to extract the Imaginary coefficient in column C.

➤ Now, write the following formula in C5 and press ENTER.


Here, “1+2i” is the Complex Number

Excel IMAGINARY Function

Note: When you wrap a text with an inverted comma assigned in the IMAGINARY function, it recognizes the text as a complex number.

➤ Then, press ENTER and the cell will return you the imaginary coefficient of the assigned complex number.

➤ Each time you assign an individual complex number as the argument of the IMAGINARY function, you will get the corresponding imaginary coefficient from it.

Thus, we get all the imaginary coefficients for the corresponding imaginary numbers.

2. Using Cell Reference in IMAGINARY Function

If you don’t want to use the Inverted Comma in the IMAGINARY function, you can use the cell reference. There is an extra advantage of using cell references. You don’t need to apply the formula every time like Method 1 here.

➤ First, just select a cell and type the following formula in that cell.



  • B5:- Complex Number

Excel IMAGINARY Function

➤ Now, press ENTER to show the result.

➤ Next, drag the formula down to copy it to the other cells. It will Autofill the formula for other cells.

➤ As a result, you will get the imaginary coefficient for all the complex numbers.

3. Utilizing COMPLEX Function Nested in IMAGINARY Function in Excel

We have a list of some real numbers and some imaginary numbers (with the suffix “i”). We have learned how to insert complex number with real and imaginary part in Excel.

Excel IMAGINARY Function

Now, we will see how we can use the IMAGINARY function nested with the COMPLEX function to get the imaginary coefficient from it.

➤ Here, type the following formula in cell D5.



  • 1:- Real Part
  • 2:- Imaginary Part

➤ Then, press ENTER, The COMPLEX function will return the complex number and so, the IMAGINARY function will extract the imaginary coefficient from it.

➤ Apply individual formulas each time to get the acquainted result.

Excel IMAGINARY Function

Extracting Real Coefficient from Imaginary Number with IMREAL Function

We have seen the use of the IMAGINARY function to extract the imaginary coefficient. But for the real part, you have to use the IMREAL function.

This IMREAL function returns the real coefficient of an imaginary number.

We have taken the same imaginary numbers as previously used.

➤ Write the following formula in C5 and press ENTER.



B5:- Complex Number

Excel IMAGINARY Function

So, we get the real coefficient for the first imaginary number.

➤ Now, Hold and Drag the C5 cell downward.

And, we have all the real coefficients for all imaginary numbers.

Practice Section

Here, we are providing you with a practice section where you can practice yourself.

Things to Remember

  • While applying the complex number directly into the IMAGINARY function, don’t forget to use the inverted Comma. Otherwise, the function tries to correct the formula and returns 0 always.
  • If the complex number is used as a cell reference, then there is no need to put an inverted Comma.

Download Practice Workbook

You can download and practice this workbook.


So, we learned how to use the IMAGINARY function in Excel. We hope you find the content of this article useful. If there are any queries or suggestions regarding any of these procedures, feel free to leave them in the comment section.

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Sourav Kundu
Sourav Kundu

Sourav Kundu, BSc, Naval Architecture & Marine Engineering, Bangladesh University of Engineering and Technology, is a dedicated technical content creator of the ExcelDemy project. He has a keen interest in Excel and he leverages his problem-solving skills to provide solutions on user interface with Excel. In his position as an Excel & VBA Content Developer at ExcelDemy, Sourav Kundu not only adeptly addresses challenging issues but also demonstrates enthusiasm and expertise in navigating complex situations. Apart from creating... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF