IMREAL function

Extracts the real coefficient of a complex number specified as a text string in the form a+bi or returned from the COMPLEX function.

=IMREAL(inumber)

Generate a IMREAL formula

Describe what you need. The generator will reach for IMREAL where IMREAL is the right tool, and tell you when it is not.

How to get a better answer
  • Name your columns by letter and by header: "column F (Net Value)" beats "the amount column".
  • State every condition, including the negatives — "not cancelled" changes the formula's shape.
  • Say where the data starts if it is not row 1, and whether it will grow.
  • Check the settings above match your spreadsheet: the wrong argument separator is a syntax error on your machine.

Arguments

How IMREAL reads its arguments
inumberrequiredIMREAL
ArgumentRequiredDescription
inumberRequiredA complex number either as text in the form 'a+bi' or 'a-bi' (with i explicitly included), or as the result of the COMPLEX function; must contain a valid numeric real part or returns #VALUE!.

Returns

A number representing the real part of the complex number.

Availability

Excel: All · Google Sheets: Supported

Worked examples

1. Extract maintenance cost from a complex number

VehicleCostPriority
TR-0014501
=IMREAL("450+1i")

Result: 450

The complex number '450+1i' encodes a maintenance cost of 450 (real part) and a service priority of 1 (imaginary part). IMREAL isolates and returns the real coefficient 450, representing the actual service cost for vehicle TR-001.

2. Extract real cost from COMPLEX-generated value

VehicleCostPriority
TR-0023202
=IMREAL(COMPLEX(F2,G2))

Result: 320

COMPLEX(320, 2) creates the complex number 320+2i. IMREAL extracts the real part, returning 320, which represents the maintenance cost of $320 for vehicle TR-002's garage service.

3. Extract real cost from a column of stored complex values

VehicleOdometerCostPriority
TR-00328900280+1i
=IMREAL(E3)

Result: 280

When maintenance data combines cost and priority as a single complex number in column E (e.g., '280+1i'), IMREAL extracts just the real component. The result 280 represents the maintenance cost for TR-003, leaving the priority indicator separate.

Common errors

Which IMREAL error are you seeing?
IMREAL returned an error#VALUE!
Ensure the real part is numeric without currency symbols or letters. Use =IMREAL("450+2i") instead of =IMREAL("$450+2i") or =IMREAL("cost+2i").
#VALUE!
Use the correct format 'real+imag i' or 'real-imag i' with the 'i' explicitly stated. Corrected: =IMREAL("450+2i") or =IMREAL("450-2i").
#VALUE!
Provide a valid complex number string or a reference to a cell containing a COMPLEX formula result. Verify the cell is not empty before using it in IMREAL.
ErrorWhy it happensHow to fix it
#VALUE!The real part of the complex number contains non-numeric text. For example, =IMREAL("abc+5i") or =IMREAL("$450+2i") where the real coefficient is text instead of a number.Ensure the real part is numeric without currency symbols or letters. Use =IMREAL("450+2i") instead of =IMREAL("$450+2i") or =IMREAL("cost+2i").
#VALUE!The complex number format is incorrect or missing the imaginary unit 'i'. For example, =IMREAL("450+2") or =IMREAL("450 plus 2i") where the syntax violates the required a±bi pattern.Use the correct format 'real+imag i' or 'real-imag i' with the 'i' explicitly stated. Corrected: =IMREAL("450+2i") or =IMREAL("450-2i").
#VALUE!Empty or null input passed to IMREAL. For example, =IMREAL("") or =IMREAL(E5) where cell E5 contains no value or is blank.Provide a valid complex number string or a reference to a cell containing a COMPLEX formula result. Verify the cell is not empty before using it in IMREAL.

Tips and when to use something else

  • IMREAL is the counterpart to IMAGINARY: use IMREAL to extract the real coefficient and IMAGINARY to extract the imaginary coefficient; for '450+2i', IMREAL yields 450 and IMAGINARY yields 2.
  • Use COMPLEX to programmatically build complex numbers from separate components (cost and priority in your fleet log), then IMREAL to retrieve the real part in downstream calculations.
  • Complex numbers encode multi-dimensional data compactly; in this fleet log, the real part represents cost and the imaginary part represents priority, allowing both values to travel through a single cell.
  • If you need only a plain number and do not actually require complex arithmetic, use the number directly instead of wrapping it in COMPLEX and IMREAL; reserve IMREAL for when complex values are already present or calculated.

Frequently asked questions

What is the difference between IMREAL and IMAGINARY?
IMREAL extracts the real (first) coefficient of a complex number, while IMAGINARY extracts the imaginary (second) coefficient. For the complex number '450+2i', IMREAL returns 450 and IMAGINARY returns 2. Both functions are needed to separate the two components of a complex number.
Does IMREAL work with negative imaginary parts like 450−3i?
Yes. IMREAL extracts only the real part and ignores the sign and magnitude of the imaginary component entirely. Whether the complex number is '450+3i' or '450-3i', IMREAL returns 450 in both cases.
What text format should I use when entering complex numbers as a string?
Use the standard format 'real+imag i' or 'real-imag i' with spaces optional. IMREAL recognizes '450+1i', '450 + 1i', '450-2i', and '320 - 3 i'. The imaginary unit 'i' must be explicitly included or the function returns #VALUE!.
When should I use IMREAL instead of referencing the number directly?
Use IMREAL when complex numbers are already stored in cells or calculated via the COMPLEX function, allowing you to programmatically extract the real part. In your fleet log, if maintenance records encode both cost and priority as complex numbers, IMREAL isolates the cost for reporting or further calculation without manually copying values.

Need a different formula?

The full generator is not scoped to one function — describe any spreadsheet problem and it will pick.

Open the formula generator

Reviewed 2026-09-17