Margin Expansion Stock Screener Excel: May 2026 Profitability Quality Dashboard

In this article

A margin expansion stock screener finds companies whose gross, operating, and net margins widened compared with the same quarter a year earlier. This free Excel template does it for a 28-stock large-cap watchlist: MarketXLS formulas such as =GrossMargin("AAPL"), =OperatingMargin("AAPL"), and =NetProfitMargin("AAPL") pull current margins, you add prior-year values from the 10-Q, and the workbook scores each stock 0 to 100 on margin level, year-over-year change, and ROE, then tags it Expanding, Stable, or Compressing. It was built after Q1 2026 earnings, when companies that held pricing and controlled operating costs reported wider margins and those absorbing labor and freight costs reported narrower ones.

See it in actionMarketXLS video

Try it in your own spreadsheet

Get the free MarketXLS sample workbook (.xlsx).

No account needed. MarketXLS live data requires a paid plan. Preview workbook

Explore more videos
Margin expansion stock screener excel - MarketXLS profitability quality dashboard for post Q1 2026 earnings

This guide walks through the screener logic, shows the MarketXLS formulas behind every column, and links to two ready-to-use Excel templates (one static sample, one live-formula version). The framework is educational. Use it as one filter on a broader process. It is not a recommendation to buy or sell any security.

Why Margin Expansion Matters After Q1 2026

Margin expansion shows that a company is keeping more of each dollar of revenue. Revenue can grow because a company is buying volume with discounts, and EPS can grow because a company is buying back shares; margins show whether the underlying operations improved. If gross margin expanded year-over-year, the company is either getting better pricing, lower input costs, or a richer mix. If operating margin expanded, the company is getting operating leverage on fixed costs. If net margin expanded too, the operating story is flowing through tax and interest. Three expanding lines is a signal worth screening for.

After Q1 2026, three macro pressures shaped the margin picture across the market:

PressureSectors Most AffectedMargin Reaction
Labor cost normalizationRetail, restaurants, consumer staplesMixed - large-cap retailers held margin, smaller players compressed
Freight and input cost resetIndustrials, materials, foodGross margin recovery for those that held pricing
AI capex flowing into revenueMega-cap tech, semis, hyperscaler suppliersOperating margin expansion in hardware and software platforms

The screener in this guide weights names that benefit from all three at the same time. The watchlist starts with 28 large caps spanning every GICS sector so you can compare margin behavior across the index, not just within tech.

Key Margin Metrics in the Screener

The dashboard tracks four margin lines plus a year-over-year change for each. Verify every formula in the MarketXLS Function Docs before relying on the screener with your own ticker list.

MetricWhat It MeasuresMarketXLS Formula
Gross marginRevenue minus cost of goods sold, divided by revenue=GrossMargin("AAPL")
Operating marginOperating income divided by revenue=OperatingMargin("AAPL")
EBIT marginEBIT divided by revenue=EBITMargin("AAPL")
Net profit marginNet income divided by revenue=NetProfitMargin("AAPL")
Pre-tax profit marginPre-tax income divided by revenue=PreTaxProfitMargin("AAPL")
Return on equityNet income divided by shareholders equity=ReturnOnEquity("AAPL")
Trailing P/EPrice divided by trailing twelve-month EPS=PERatio("AAPL")
SectorGICS sector classification=Sector("AAPL")
Live priceMost recent traded price=QM_Last("AAPL")

Each of these is a single-argument call that takes a ticker symbol in quotes. The screener pulls them into one row per ticker, then derives the year-over-year change and a composite score. The full formula reference lives in a "MarketXLS Functions Used in This Sheet" box at the bottom of every tab in the workbook.

The Margin Quality Score

The composite Margin Quality Score is the screener's headline number. It blends three sub-scores into a 0 to 100 scale so you can rank a watchlist of any size in one glance.

Sub-ScoreInputsDefault Weight
Margin LevelOperating margin (vs 40% target) + Net profit margin (vs 30% target)40%
Margin ExpansionOp margin YoY change + Net margin YoY change (each vs 5pp target)35%
Quality KickerReturn on equity (vs 30% target)25%

Weights live in the Inputs sheet so you can re-weight the score without touching the formulas. If you care more about absolute profitability than year-over-year improvement, drag the Margin Level weight to 60% and shrink the Expansion weight. If you want a pure rate-of-change screen, do the opposite. The composite formula in cell M4 of the Margin Dashboard looks like this in plain English:

Score = MarginLevel * Inputs!C11 + MarginExpansion * Inputs!C12 + ROEQuality * Inputs!C13

Each sub-score is clamped between 0 and 100 with the MIN and MAX functions so an outlier on one dimension cannot dominate the total. A 100% operating margin (hypothetical) caps at 100 on the level sub-score rather than pushing the composite above 100. The same goes for a 50 percentage point YoY expansion - a real margin reading at that level would be a measurement error, and the clamp protects the rank order from being distorted.

Reading the Margin Tag Column

Next to the score, every row in the dashboard gets a tag based on year-over-year margin direction. The tag depends on two thresholds set in the Inputs sheet:

TagRuleMeaning
ExpandingOp margin YoY change AND Net margin YoY change both above +50bpsMargin story is intact at both the operating and net line
StableOp margin YoY change between -50bps and +50bpsNo material change, watch for a trend break
CompressingOp margin YoY change AND Net margin YoY change both below -50bpsCost growth is outpacing revenue growth

The 50 basis points threshold is meant to filter out reporting noise. Many companies record one-time charges that move margin by 20 to 30 basis points without changing the underlying operating story. A 50 basis point YoY move is large enough to be a real signal in most cases, but you can tighten or loosen it from the Inputs sheet.

The Margin Dashboard also conditional-formats the YoY columns with a green-yellow-red color scale so you can scan the watchlist visually before reading the tags.

The Triple Expander Filter

The Expansion Tracker sheet takes the YoY logic one level further. Instead of looking at just operating and net margin, it checks all three lines: gross, operating, and net. A name that expanded all three is tagged a "Triple Expander". A name that expanded two is a "Double Expander". One is "Single Expander". Zero is "Stable / Compressing".

StatusMargin patternRead
Triple ExpanderGross, operating, and net margin changes all positivePricing, operating leverage, and bottom-line conversion all working
Double ExpanderTwo of three positive; one negativeMixed story, look at the specific line
Single ExpanderOne of three positive; two negativeLikely a one-off; verify with the 10-Q before acting
Stable / CompressingZero positiveReview the reported figures and company commentary to understand the changes

The Triple Expander tag is the strictest filter. Historically, names that print three expanding margin lines in the same quarter are a much smaller cohort than the broader "Expanding" tag on the Margin Dashboard. This is the filter to run when you want a short conviction list rather than a broad screen.

How To Use the Screener Sheet by Sheet

The workbook ships with eight sheets. Each one references the Inputs tab so changing one yellow cell ripples through the entire model.

Cover. Brands the workbook, shows the data-as-of date, and links back to MarketXLS for the live-formula version.

How To Use. A page-one explainer that walks a new user through every sheet without leaving Excel. Useful when you share the template with a colleague.

Inputs. All ten user inputs in one place. Portfolio size, max position cap, margin minimum thresholds, YoY expansion and compression thresholds, and the three composite score weights. Yellow background marks each editable cell.

Margin Dashboard. The main screener. One row per ticker with price, all four margin lines, the YoY change for op and net margin, ROE, P/E, the composite Margin Quality Score, and the Expanding / Stable / Compressing tag. Sort by score to rank the watchlist.

Expansion Tracker. Current quarter margin vs prior-year same-quarter margin for gross, operating, and net. Generates the Triple Expander / Double Expander / Single Expander / Stable filter. The template version of this sheet leaves the prior-year cells blank for you to fill from the 10-Q because MarketXLS does not currently expose a prior-year margin function directly.

Margin Trend. A clean side-by-side of all four margin lines plus the gross-to-operating gap. A wide gap means SG&A and R&D are absorbing a large share of revenue. A narrowing gap is the fingerprint of operating leverage. A widening gap is the fingerprint of cost creep.

Portfolio Allocation. Auto-sizes positions across the top eight names on the Margin Quality Score using your portfolio size and per-position cap. Computes cap shares, score-weighted dollar allocation, and final share counts. Shows total allocated, percent of portfolio, and cash reserve at the bottom.

Sector Comparison. Roll-up by GICS sector showing how many names in each sector tagged Expanding vs Stable vs Compressing. A sector with five Expanding names out of five is a stronger story than a sector with two Expanding names out of ten.

Building the Dashboard Formula by Formula

Here is the exact formula pattern that lives in row 4 of the Margin Dashboard for a single ticker. Adapt the references to your own watchlist.

Symbol:       AAPL
Name:         Apple Inc.
Sector:       =Sector("AAPL")
Price:        =QM_Last("AAPL")
Gross M %:    =GrossMargin("AAPL")/100
Op M %:       =OperatingMargin("AAPL")/100
EBIT M %:     =EBITMargin("AAPL")/100
Net M %:      =NetProfitMargin("AAPL")/100
ROE %:        =ReturnOnEquity("AAPL")/100
P/E:          =PERatio("AAPL")

Formula documentation: Sector, QM_Last, GrossMargin, OperatingMargin, EBITMargin, ReturnOnEquity, PERatio

MarketXLS returns margins as percentages (45.2 for 45.2%), so dividing by 100 in the cell gives you a clean decimal that pairs with Excel's "0.0%" number format. If you prefer to display the raw percentage, drop the divide and switch the format to "0.0".

The composite score formula in column M is longer because it embeds the sub-scores and the weights. Here is the pattern, with row references shown for row 4:

=(MIN(MAX(F4,0)/0.40,1)*50 + MIN(MAX(H4,0)/0.30,1)*50) * Inputs!$C$11
+ (((MIN(MAX(I4,-0.05)/0.05,1)*50+50)
   +(MIN(MAX(J4,-0.05)/0.05,1)*50+50))/2) * Inputs!$C$12
+ MIN(MAX(K4,0)/0.30,1)*100 * Inputs!$C$13

Each MIN(MAX(...)) construct clamps a sub-score to a sensible band before applying the weight. F4 is operating margin, H4 is net margin, I4 is op margin YoY change, J4 is net margin YoY change, K4 is ROE. The Inputs references make the weights live, so changing them on the Inputs sheet updates every row in real time.

Sector Patterns in Q1 2026 Margins

Across the 28-name watchlist, the Q1 2026 sample data shows a clear sector split. Information Technology and Communication Services dominate the Triple Expander column. Energy and parts of Consumer Staples sit at the bottom. Industrials and Healthcare are mixed.

SectorExpanding (sample)Compressing (sample)Read
Information TechnologyHighLowAI capex monetization plus operating leverage in software
Communication ServicesHighLowAd pricing recovery and cost discipline at platforms
HealthcareMixedMixedDrug pricing held, but health insurance margins thinned
IndustrialsMixedMixedOrder book strength, but freight and labor cost pressure
FinancialsStableLowNet interest income held, payment networks expanded
Consumer DiscretionaryMixedMixedDiscounting cycle is uneven
Consumer StaplesLowMixedVolume softness offset by mix richening
EnergyLowHighOil price normalization compressed refining and integrated margins
MaterialsMixedMixedIndustrial gases held, base metals softened

These are sample-snapshot reads, not forecasts. The point of the live-formula template is that the picture changes every time a company reports. Refresh the workbook before every screen and the sector roll-up updates with it.

Implementation Tips From Live Use

A few field notes from running the screener on a weekly cadence.

First, refresh after every print, not just at quarter end. Q1 2026 stragglers reported through late May. NVIDIA reported May 28. Costco reports in early June. A screener built on TTM margins moves with every fresh 10-Q, so the order of names can change meaningfully week to week during the back half of a reporting season.

Second, do not trust a single Triple Expander quarter. Margin expansion is a noisy signal at the single-quarter level because of one-time items, restructuring charges, and accounting treatment of stock-based compensation. Look for at least two consecutive Triple Expander quarters before treating it as a durable signal. The Margin Trend sheet is structured to make multi-quarter inspection easier by sitting next to the Expansion Tracker.

Third, layer a valuation check on top. Margin expansion is a quality signal, not a valuation signal. Use the P/E column on the Margin Dashboard, or pull in =ForwardPE("AAPL") and =PEGRatio("AAPL") for a forward look. A Triple Expander at 60x earnings has a different risk profile than a Triple Expander at 18x.

Fourth, watch the gross-to-operating gap. The Margin Trend sheet flags this gap explicitly. A name that has expanding gross margins but flat or compressing operating margins is investing more in SG&A and R&D. That can be a growth story (rising sales force, more engineers) or a cost-control problem (sales productivity falling). The 10-Q breakdown tells you which.

Fifth, sanity-check the sector mix. If the dashboard top decile is entirely tech, the screener is doing what you set it up to do, but you may be missing structural changes elsewhere. The Inputs sheet weights are there so you can re-tilt the score toward absolute margin level (favors mature tech and financials) or toward expansion rate (favors mid-cycle industrials and recovering consumer names).

Download the Templates

Download the templates:

  • - Pre-filled with snapshot data captured May 23, 2026. Every cell shows the MarketXLS formula that would power it in the live version.
  • - Live-updating MarketXLS formulas. Requires a MarketXLS subscription.

Both files have the same eight-sheet structure. The sample version opens in plain Excel without any add-in and is useful for inspecting the formula structure before you commit to the live build. The template version is the one to use in a daily or weekly workflow because it pulls the most recent margin data automatically.

Pairing the Screener With MarketXLS Tools

The screener is more useful when you connect it to the rest of the MarketXLS workflow. A few pairings that show up often in live use:

  • Stock screener. Use the MarketXLS stock screener to build a starting universe, then export the symbols into the Margin Dashboard for the margin overlay.
  • AI stock screener. The AI stock screener layer can prefilter for "high quality" or "improving fundamentals" before you apply the margin gates.
  • Stock analysis. Drop any Triple Expander name into the stock analysis tool for a deeper look at cash flow, balance sheet, and analyst estimates.
  • Portfolio. Move the Portfolio Allocation sheet output into the portfolio tracker to monitor margin direction at the position level after entry.

The screener is the entry filter. The other tools cover what happens after.

FAQ

What is a margin expansion stock screener excel? A margin expansion stock screener in Excel is a spreadsheet that ranks a universe of stocks by how much their gross, operating, and net margins have widened compared to the same quarter in the prior year. The MarketXLS version pulls live margin data with formulas like =GrossMargin(), =OperatingMargin(), and =NetProfitMargin() and combines them into a composite Margin Quality Score, then tags each name as Expanding, Stable, or Compressing.

How do I screen for margin expansion in Excel? Build a watchlist of tickers, pull current and prior-year margin values for each, compute the year-over-year change, and rank the list by the change. With MarketXLS, the current values come from formulas like =OperatingMargin("AAPL") and =NetProfitMargin("AAPL"). The prior-year comparable can be pulled from the company's 10-Q or from MarketXLS Historical Financials. The Margin Expansion Stock Screener Excel template in this post does this for 28 large caps and updates live.

Which MarketXLS formula gives operating margin? =OperatingMargin("AAPL") returns the trailing operating margin (operating income divided by revenue) for the ticker passed in. The result is a percentage value, so divide by 100 in the cell if you want a decimal that pairs with the "0.0%" Excel number format.

Is margin expansion a buy signal? Margin expansion is a quality signal, not a buy signal. It tells you the operating model is improving but says nothing about whether the price already reflects that improvement. Layer a valuation gate (P/E, forward P/E, PEG, or EV/EBITDA) on top of the screener before any decision. The Margin Dashboard in the template includes the P/E column for exactly this reason. This blog is educational and not investment advice.

Why use Excel instead of a screener website for margin screening? Three reasons. First, you control the universe (your own watchlist, your sector mix, your size cap). Second, you control the weighting (margin level vs expansion vs ROE) instead of accepting a vendor preset. Third, the result is auditable: every column is a formula you can inspect, and the values refresh when Excel recalculates.

Can I add forward estimates to the margin expansion screener? Yes. Add a column for =EPSEstimateNextQ("AAPL") or =ForwardPE("AAPL") to bring forward-looking earnings into the dashboard. Forward margin is harder to source as a single function, but you can compute an implied forward operating margin by combining forward revenue estimates with consensus operating income estimates pulled via the EarningsEstimates family of MarketXLS formulas.

The Bottom Line

Margin expansion shows whether a company's operations are improving, separate from revenue bought with discounts or EPS lifted by buybacks. A screener built around margin level, year-over-year change, and ROE ranks a watchlist on that signal after each earnings season.

The Margin Expansion Stock Screener Excel template gives you that screener in eight sheets, with every data column powered by a MarketXLS formula (prior-year margins are entered from the 10-Q). Download the sample to inspect the structure. Plug the template into your live workflow if you have a MarketXLS subscription. See the MarketXLS function reference and pricing, or book a demo to see how the screener fits into a broader research workflow.

This template is for educational use only. Nothing here is a recommendation to buy or sell any security. Backtest any rule-based screener and verify the data before putting real money behind it.

About the authors
Ankur

About Ankur

CEO & Founder, MarketXLS

Ankur is the CEO and founder of MarketXLS. He works with Anagh and Robin on the MarketXLS blog, creating articles together about market data and spreadsheet workflows.

Written collaboratively by Ankur, Anagh and Robin.

Important Disclaimer

The information provided in this article is for educational and informational purposes only and should not be construed as investment advice, a recommendation, or an offer to buy or sell any securities. MarketXLS is a financial data platform and is not a registered investment advisor, broker-dealer, or financial planner. Always conduct your own research and consult with a qualified financial professional before making any investment decisions. Past performance is not indicative of future results. Trading and investing involve substantial risk of loss.

Explore MarketXLS in Excel
Download a free sample workbook (.xlsx). MarketXLS is a paid subscription.

See MarketXLS in action

Bring this workflow into Excel.

Book a demo with our team to see how MarketXLS supports your market research.

Ankur
AnkurFounder & CEO, MarketXLS
Book a demo