How to Biggest Gainers And Losers in Excel

Learn multiple Excel methods to identify the biggest gainers and losers with step-by-step examples and practical applications.

excelformulaspreadsheettutorial
12 min read • Last updated: 7/2/2025

How to Biggest Gainers And Losers in Excel

Why This Task Matters in Excel

Tracking the “biggest gainers and losers” is one of the fastest ways to find meaningful change in any dataset that compares a “before” and “after” value. Investment analysts monitor the top-performing and worst-performing stocks each day to spot market momentum. Sales managers look for the products or regions with the largest increases or drops in revenue to steer marketing budgets. Operations teams compare planned versus actual costs to see which departments overspent or underspent the most. In every case, the number of records can run into the hundreds or thousands. Manually scanning through a table to see which row rose or fell the most is not practical, and eye-ball estimates almost always miss edge cases such as large percentage changes on small bases.

Excel shines in this problem for several reasons. First, it supports quick calculations of absolute or percent change with simple arithmetic. Second, modern dynamic array functions such as SORT, FILTER, TAKE, and LET make it possible to generate live-updating “Top N” or “Bottom N” lists with just one formula. Even in older versions that lack dynamic arrays, the combination of LARGE, SMALL, INDEX, and MATCH can produce the same insights, albeit with a few more steps. Third, Excel’s pivot tables, conditional formatting, and charts provide additional layers of analysis and visualization once you have surfaced the major movers.

Failing to master this task can lead to delayed decisions, missed opportunities, and an inability to communicate important findings quickly. If you cannot confidently point to the three biggest cost overruns in a project status meeting, your credibility suffers. Knowing how to surface gainers and losers also strengthens other Excel workflows: forecasting (because you understand volatility), dashboarding (because you can spotlight outliers), and data cleaning (because unusually large changes often signal errors). In short, every analyst who works with time-series or comparison data will encounter this need repeatedly, and Excel offers an accessible yet powerful toolkit for it.

Best Excel Approach

For most users on Microsoft 365 or Excel 2021, the most streamlined approach combines a single helper column that calculates change, plus the dynamic array pair SORT and TAKE. This results in one formula for gainers and one for losers, both of which spill a live list that automatically resizes when you add rows or refresh data. The logic is:

  1. Calculate change (absolute or percent) in a dedicated column.
  2. Sort the entire table descending by that change.
  3. Return the first N rows for biggest gainers, or
  4. Sort ascending and return the first N rows for biggest losers.

The dynamic array formula for biggest gainers, assuming your table is named tblData with columns Item, Old, New, and Change, might be:

=TAKE(SORT(tblData,-1,4),N)

Explanation of parameters:

  • tblData – the full data table to sort.
  • -1 – descending order.
  • 4 – the position of the Change column in the table.
  • N – how many rows you want returned, e.g., 5 for “Top 5”.

For biggest losers you flip the sort order:

=TAKE(SORT(tblData,1,4),N)

If your Excel version lacks dynamic arrays, you can still achieve the same outcome with a SMALL/LARGE helper approach which we cover in Alternatives. However, whenever possible, the SORT-plus-TAKE pattern is preferable because it involves fewer formulas, is easier to audit, and expands automatically.

Parameters and Inputs

  • Source values: Two numeric columns you wish to compare (Previous vs Current, Year-1 vs Year-2, Budget vs Actual, etc.). These should be consistent data types (all numbers; no blank text cells).
  • Identifier column: A descriptive field such as Product, Ticker, Region, or Employee that will appear in the result list.
  • Change calculation: Decide whether you want absolute change (New – Old) or percent change ((New – Old)/Old). Both are useful but yield different rankings.
  • Top/Bottom N: A whole number that controls list length. Make it a named range or cell reference so managers can change it on demand.
  • Data stored in an Excel Table: Tables auto-expand, preserve formulas in new rows, and give structured references such as tblData[Change].
  • Validation: Ensure the Old column does not contain zero when calculating percent change to avoid division errors. Use IFERROR or a validation rule to handle zeros.
  • Edge cases: Ties in change values will display all tied rows once they enter the top N, which may cause the list to spill more rows than expected. Decide if that is acceptable.

Step-by-Step Examples

Example 1: Basic Scenario

Suppose you have five products and you want the “Top 3 gainers” and “Top 3 losers” based on absolute change in monthly sales.

  1. Enter sample data:
A1: Product   B1: Jan   C1: Feb
A2: Alpha     B2: 1200  C2: 1450
A3: Beta      B3: 2200  C3: 2100
A4: Gamma     B4:  800  C4:  950
A5: Delta     B5: 1900  C5: 2500
A6: Epsilon   B6: 1400  C6: 1100
  1. Convert [A1:C6] into a Table (Ctrl+T). Name it tblSales.
  2. Add a Change column in D1 with the formula =[@Feb]-[@Jan]. The column auto-fills.
    Resulting values: 250, -100, 150, 600, -300.
  3. In F1 enter “Top 3 Gainers” and in F2 write:
=TAKE(SORT(tblSales,-1,4),3)

You see a spill range returning Delta (600), Alpha (250), Gamma (150).
5. In H1 enter “Top 3 Losers” and in H2 write:

=TAKE(SORT(tblSales,1,4),3)

It spills Epsilon (-300), Beta (-100), etc.
6. Resize N by changing the numeral in the TAKE function or point it to a cell so managers can change “Top 3” to “Top 5” instantly.

Why it works: The Change column converts your two-column comparison into a single metric. SORT reorders the entire table by that metric, and TAKE picks off the first N rows, preserving all columns so you can display both the identifier and the change value without additional lookups.

Troubleshooting: If nothing spills, you may be using an older Excel version. If you see incorrect rankings, confirm the Change column is numeric (no stray spaces) and that your sort index is correct (4 in this case).

Example 2: Real-World Application

Scenario: A regional sales manager for a retail chain tracks weekly store revenue for 150 locations. Each Monday morning they want a dashboard showing the 10 stores with the biggest percentage increase and the 10 with the biggest percentage decrease compared with the previous week.

Data preparation:

  • Import CSV point-of-sale export into Excel.
  • Create a Table named tblStores with columns: StoreID, Region, WeekN-1, WeekN.
  • Add a PercentChange column with:
=IF([@WeekN-1]=0,NA(),([@WeekN]-[@WeekN-1]) / [@WeekN-1])

The IF logic protects against division by zero from new stores that had no sales last week.
Dashboard setup:

  • Cell B2: a slicer linked to tblStores[Region] so you can filter by region.
  • Cell D2: a named range nTop set to 10.
  • Biggest gainers list in G4:
=TAKE(SORT(tblStores,-1,5),nTop)
  • Biggest losers list in K4:
=TAKE(SORT(tblStores,1,5),nTop)

Because slicers work on tables and dynamic array formulas read the filtered results, the top and bottom lists update in real time when you select different regions. Add conditional formatting to highlight percent change above 20 percent in dark green and below negative 20 percent in red. Finally, insert two bar charts that reference the spilled lists for a visual punch.

Performance considerations: Sorting 150 rows is trivial, but in enterprise settings you might pull thousands of rows each week. Dynamic arrays remain performant because they calculate once; pivot tables can struggle if you repeatedly refresh. Still, keep the dataset on a separate worksheet and avoid volatile functions that force recalculation.

Example 3: Advanced Technique

Let’s tackle a finance example with 2,000 stock tickers and daily closing prices fetched via Power Query. You want the top 20 gainers and losers by percent change over the last five trading days, but you also must exclude any stocks with average daily volume below two million shares to avoid illiquid outliers.

  1. Use Power Query to pull two datasets: Prices (columns: Ticker, Date, Close) and Volume (Ticker, Date, Volume).
  2. In Power Query, merge the queries on Ticker and Date, then filter rows where Volume less than 2,000,000.
  3. After loading to Excel as a Table named tblMarket, create two helper columns:
  • LastClose: the Close price on the most recent date (use XLOOKUP in a LET wrapper).
  • PreviousClose: the Close price five trading days earlier.
  • PercentChange:
=LET(
   last,[@LastClose],
   prev,[@PreviousClose],
   IF(prev=0,NA(),(last-prev)/prev)
)
  1. Because tblMarket contains multiple rows per stock (one per date), extract the latest row per ticker using UNIQUE and SORTBY:
=LET(
   latest, SORTBY(tblMarket, tblMarket[Date], -1),
   UNIQUE(latest, [Ticker], TRUE)
)
  1. Feed the resulting dynamic array into the familiar TAK E+SORT pattern:
=TAKE(SORT(result,-1, columnIndexPercentChange),20)

Replace result with the dynamic array name from step 4.
Edge case handling: Use the # operator to reference the entire spilled array in subsequent formulas. If a corporate action such as a stock split creates extreme values, set up an additional filter condition such as ABS(PercentChange) less than 100 percent to weed out anomalies.

Performance: Dynamic arrays and LET reduce redundant calculations. If the workbook still feels slow, push grouped summarization back into Power Query so Excel only receives the final latest-row-per-ticker table.

Tips and Best Practices

  1. Store your data in proper Excel Tables. They auto-extend, maintain formatting, and play nicely with dynamic arrays.
  2. Use descriptive named ranges such as nTop or colChange so formulas read like sentences. It reduces errors in maintenance.
  3. Wrap complex calculations inside LET to calculate sub-expressions once, improving readability and speed.
  4. Convert percent change columns to Percentage format for clarity, but keep the raw numeric value for sorting.
  5. Protect against division by zero with IF or IFERROR; otherwise a single error will blank your entire dynamic array output.
  6. Document the logic of “gainer” vs “loser” in a comment or separate cell; people often confuse absolute and percent change.

Common Mistakes to Avoid

  1. Forgetting to fix the sort index: If your Change column is not the last column, accidentally using 4 instead of its true position yields wrong rankings. Double-check the numeric index or use the column header reference in SORTBY.
  2. Inconsistent data types: Mixing text and numeric values in the Change column causes SORT to treat numbers as text. Ensure all entries are numeric.
  3. Not handling ties: When two rows have exactly the same change, both will appear if they tie for the last spot in your Top N. Account for this in your layout or accept the spill.
  4. Using volatile functions like RAND or NOW inside the Change column without reason. They recalculate every time Excel refreshes, slowing the workbook.
  5. Manual filtering after formulas: If you filter the result spill range manually, Excel converts it to a static range and breaks the dynamic update. Always filter the source table instead.

Alternative Methods

MethodExcel VersionProsConsBest Use
SORT + TAKE (dynamic arrays)365/2021Single formula, auto-spills, handles variable NNeeds latest ExcelMost modern workbooks
SORTBY + INDEX365/2021Sort by calculated column without helperSlightly longer formulaWhen you cannot insert a helper column
LARGE/SMALL + INDEX/MATCH2010-2019Works in older ExcelRequires separate formula per row, array entryLegacy environments
Pivot Table with Top 10 filterAllPoint-and-click, no formulasLess flexible for mixed criteriaQuick ad-hoc summaries
Power Query2016+Handles massive data, refreshableNo live formulas in grid, steeper learning curveData sets 100k+ rows

When migrating from LARGE/SMALL to dynamic arrays, delete the old helper columns and test performance. To move a dynamic array workbook to a colleague on Excel 2016, use Copy > Paste Values to freeze the list or replicate the LARGE/SMALL approach.

FAQ

When should I use this approach?

Use it whenever you routinely compare two numeric columns and need a quick snapshot of the largest increases and decreases. Examples: weekly sales reports, monthly cost variance, daily stock returns, or engagement metrics after an A/B test.

Can this work across multiple sheets?

Yes. Reference fully-qualified ranges such as Sheet1!tblSales in your SORT function, or aggregate data in Power Query first. Dynamic arrays can spill across sheets only through linked cells, so place the formula on the destination sheet and reference the source sheet.

What are the limitations?

Dynamic arrays require Microsoft 365 or Excel 2021+. For older versions you need the LARGE/SMALL workaround. Additionally, TAKE does not allow non-contiguous columns; if you only want Item and Change, wrap with CHOOSECOLS.

How do I handle errors?

Wrap your final formula in IFERROR to display a friendly message. For individual Change calculations, trap divide-by-zero issues with IF([@Old]=0,NA(),…). Use conditional formatting to flag error cells so you can correct source data.

Does this work in older Excel versions?

Yes, but you must replace SORT/TAKE with helper columns and the pair LARGE/SMALL + INDEX/MATCH. Each row in your Top 5 list will need its own formula; see “Alternative Methods” above.

What about performance with large datasets?

Dynamic array formulas calculate quickly up to tens of thousands of rows. For 100k+ rows, push heavy grouping and filtering into Power Query or a database, then feed the summarized result into Excel. Avoid volatile functions and keep calculations on a single sheet when possible.

Conclusion

Being able to instantly surface the biggest gainers and losers transforms raw numbers into actionable insights. Whether you work in finance, sales, operations, or marketing, this skill lets you spotlight outliers, focus attention, and drive informed decisions. Excel’s modern dynamic arrays make the process nearly effortless, while backup techniques ensure compatibility with older versions. Master this task and you add a high-impact tool to your analytical arsenal, one that integrates smoothly with dashboards, pivot tables, and Power Query. Experiment with the examples provided, adapt them to your datasets, and you’ll never again wonder where the biggest changes are hiding.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve.