BLOG

Behind the numbers.

Code examples, market analysis, and data quality deep-dives.

How Concentrated Are S&P 500 Earnings? Point-in-Time Index Analysis in Python
Does Volatility Scale With the Square Root of Time? Variance Ratio Test in Python
Does Goodwill Distort the Price-to-Book Screen? Goodwill-Adjusted Valuation in Python
How Are Shares Outstanding Reported (and Why They Disagree)
Do Low-Volatility Stocks Deliver Better Risk-Adjusted Returns? S&P 500 Quintile Sorts in Python
Does Trend Following Beat Buy and Hold? Time-Series Momentum in Python
Has the Stock-Bond Correlation Flipped? 60/40 Portfolio Risk in Python
What API to Use for a Stock Screener
Which Assets Hedge Inflation Shocks? Macro Factor Betas in Python
Does Covariance Shrinkage Beat the Sample Covariance? Minimum-Variance Portfolios in Python
Do Faster Inventory Turns Mean Thinner Margins? Gross Margin Return on Inventory in Python
SEC EDGAR API vs Fundamentals API: Which to Use
Does Fast Earnings Growth Persist? Rank Correlation Analysis in Python
Split Adjustment Explained: Adjusted Close vs Close
Which Trading Day of the Month Pays Best? Turn-of-the-Month Analysis in Python
Can You Use Yahoo Finance Data Commercially?
How Many Independent Bets Does a Nine-Sector Portfolio Give You? Eigenvalue Analysis in Python
Which Volatility Forecast Wins One Month Ahead? HAR vs EWMA in Python
How Concentrated Are Institutional Equity Portfolios? Form 13F Concentration Analysis in Python
Do Stocks Earn Their Returns Overnight or Intraday? Return Decomposition in Python
When Do Corporate Insiders Actually Trade? Form 4 Timing Analysis in Python
Data Requirements for Backtesting a Trading Strategy
What Is Survivorship Bias in Backtesting?
Do High Dividend Yields Come From Bigger Payouts or Falling Prices? Yield Decomposition in Python
Do Stocks Fall Harder Than They Rise? Downside Beta vs Upside Beta in Python
Does Volatility Targeting Improve Sharpe Ratios? Seven-Asset Backtest in Python
Free Stock Market Data APIs: What You Actually Get
How to Give an LLM Financial Data With an MCP Server
Does Post-Earnings Announcement Drift Survive Real Filing Dates? PEAD Event Study in Python
Do Insider Buying Clusters Predict Returns? Signal Testing in Python
Does the S&P 500 Index Effect Still Exist? Event Study in Python
Are Companies Leaving the S&P 500 Faster Than They Used To? Index Survival Analysis in Python
Does Gross Profitability Predict Stock Returns? Quintile Factor Test in Python
What Growth Rate Is the Market Pricing In? Reverse DCF in Python
Does a Strong Balance Sheet Cushion Drawdowns? Leverage and Downside Risk in Python
Does Ticker Recycling Corrupt a Mean-Reversion Backtest? Entity-Resolved Z-Scores in Python
How Much of a Growth Screen's Backtested Edge Is Survivorship Bias? Point-in-Time Index Testing in Python
Why Do Leveraged ETFs Decay? Measuring Volatility Drag in Python
Are Consumer Staples Margins Shrinking Under Inflation? Gross Margin Trend Analysis in Python
Do Weak Jobs Reports Predict Market Drawdowns? NFP Surprise Event Study in Python
Is the Rotation From Tech to Industrials Backed by Earnings? Relative EPS Growth Analysis in Python
Is the Semiconductor Rally Broadening Beyond NVIDIA? Return Dispersion Analysis in Python
Which Stocks Benefit Most When Oil Prices Fall? Oil Beta Screening in Python
Do Bond Returns Predict Stock Returns? Granger Causality Test in Python
Which Stocks Actually Drive Portfolio Returns? Shapley Value Attribution in Python
Does "Sell in May" Still Work? Calendar Anomaly Backtest in Python
How to Build Complete Price History Through Ticker Changes? Entity Resolution in Python
Are KO and PEP Cointegrated? Pairs Trading Signal Construction in Python
Which Commodities Have the Strongest Momentum? Rotation Backtest in Python
Which Commodity ETFs Have the Worst Tail Risk? Expected Shortfall in Python
Are Gold Miners Leveraged Gold Bets? Rolling Beta Analysis in Python
Does the Base-Metals-to-Gold Ratio Lead Cyclical Stocks? Signal Test in Python
Can Risk Parity Tame Commodity Volatility? Portfolio Optimization in Python
Are Power Stocks Becoming an AI Infrastructure Trade? Momentum Screening in Python
Which AI Chip Stocks Have Margin Momentum? Profitability Trend Analysis in Python
Which AI Stocks Are Cheapest Relative to Growth? Growth-Adjusted Valuation in Python
Does AI Stock Leadership Persist? Momentum Backtest in Python
Which AI Stocks Have the Cleanest Balance Sheets? Net Cash Screening in Python
Can Risk Parity Reduce Mega-Cap Drawdowns? Portfolio Optimization in Python
Which Growth Stocks Are Self-Funding? Cash-Flow Quality Screening in Python
Which Sectors Struggle When the Dollar Rallies? Sector Rotation Analysis in Python
Do Cheap Stocks Hold Up When Bonds Sell Off? Valuation Rotation in Python
Does the Nasdaq 100 Have Better Growth Quality Than the Dow? Index Constituent Analysis in Python
Do Healthcare Cash-Flow Margins Predict Returns? Signal Evaluation in Python
Which Dividend Stocks Survive a Cash-Flow Stress Test? Dividend Screening in Python
Does Heavy Insider Selling Predict Weak Returns? Insider Flow Test in Python
Can Quality Screens Reduce Small-Cap Balance-Sheet Risk? Russell 2000 Test in Python
Which Retailers Have Positive Operating Leverage? Margin Screening in Python
Is MSTR a Leveraged Bitcoin Proxy? Rolling Beta Analysis in Python
Is Micron's Memory Cycle Recovering? Inventory and Margin Forecasting in Python
Which Sectors Work When Bonds Rally? Rate-Sensitive Rotation in Python
Do One-Month Price Extremes Reverse? Signal Evaluation in Python
Do Low-Volatility S&P 500 Stocks Reduce Drawdowns? Factor Test in Python
Is AI Capex Paying Back Fast Enough? Revenue Hurdle Forecasting in Python
Could Shorter AI Asset Lives Hit Earnings? Depreciation Stress Test in Python
How Much AI Capex Risk Can a Portfolio Remove? Constrained Optimization in Python
Is the AI Capex Trade Crowded? Rolling Volatility and Sector Rotation in Python
Did the AI Boom Come From Existing S&P 500 Members? Point-in-Time Momentum Test in Python
Is AI Revenue Circular? Customer-Vendor Capex Loop Analysis in Python
Is the AI Trade Connected to Private Credit? Rolling Correlation Network in Python
Is Apollo More Balance-Sheet Sensitive Than Peers? Leverage Screen in Python
Are AI Earnings Supported by Cash Flow? Accrual and Capex Screen in Python
Can Defensive Stocks Hedge AI Drawdowns? Basket Regime Test in Python
How Fast Does the Market Price In Fed Decisions? FOMC Event Study in Python
How Much Are Options Sellers Overpaid? The Variance Risk Premium in Python
Which Companies Have the Worst Earnings Quality? Sloan Accrual Screen with Geographic Revenue Data in Python
Does the Oil-to-Gold Ratio Signal Recessions? XLE/GLD Backtest in Python
Is AI Spending Crowding Out Free Cash Flow? Capex Sustainability Across the Mag 7 in Python
Does a Long Energy / Short Bonds Portfolio Capture Inflation Surprises? Factor Construction in Python
Can a Hidden Markov Model Detect Oil Market Regimes? HMM Analysis in Python
Do Grain Prices Predict Food Inflation? Granger Causality Test in Python
Does the Corporate Credit Spread Predict Stock Market Crashes? BAA-AAA Spread Analysis in Python
Do Oil Stocks Hedge Inflation? Rolling Beta Analysis in Python
Which Stocks Are Most Rate-Sensitive? Equity Duration via Bond Beta in Python
Which Companies Have the Highest Accrual Ratios? Earnings Quality Screening in Python
Is Alpha Persistent or Decaying? Rolling Sharpe Ratio Analysis in Python
Are Markets Trending or Mean-Reverting? Hurst Exponent Analysis in Python
Is Consumer Discretionary vs Staples a Leading Indicator? XLY/XLP Ratio Analysis in Python
Does Heavy Capex Predict Future Stock Returns? Capital Expenditure Analysis in Python
How to Estimate Cost of Equity Using CAPM in Python
Is Volatility Predictable? Testing for Volatility Clustering in Python
Which Industrials Are Overleveraged? Net Debt to EBITDA Screening in Python
GM Before and After Bankruptcy: Why Entity Resolution Matters for Financial Data
What Is Adjusted Beta? Merrill Lynch Beta Shrinkage in Python
How Good Is a Stock Pick? Information Ratio and Tracking Error in Python
Do Stock Returns Follow a Normal Distribution? Testing for Fat Tails in Python
Which Large Caps Have the Highest Free Cash Flow Yield? FCF Screening in Python
Which Sectors Won Over 5 Years? Sector Rotation Analysis in Python
How to Forecast Stock Volatility with GARCH Models in Python
Are Stock Prices Mean-Reverting? Augmented Dickey-Fuller Test in Python
How to Calculate CAPM Alpha and Beta with Regression in Python
How to Compare Sector Sharpe Ratios and Sortino Ratios in Python
DELL: Why Stitching Historical Price Data Together Is Wrong
How to Analyze Drawdown and Recovery for Bank Stocks in Python
How to Screen SaaS Stocks by Revenue Growth and Cash Flow in Python
How to Screen REITs by Dividend Yield and Valuation in Python
How Correlated Are the Magnificent 7? Intra-Group Correlation in Python
AAPL vs XOM: Do Individual Stocks Have Seasonal Patterns?
How to Rank Large-Cap Stocks by Momentum in Python
How to Build a Multi-Endpoint Financial Dashboard in Python
How to Compare Volatility Across Energy Stocks in Python
How to Screen Healthcare Stocks by Valuation in Python
How to Build a Sector Correlation Matrix for Portfolio Diversification in Python
How to Find Oversold and Overbought Stocks Using Z-Scores in Python
How to Measure Earnings Quality: Cash Flow vs Net Income in Python
How to Build a Multi-Factor Stock Screen in Python (Value + Momentum + Quality)
How to Build a Simple DCF Model for Any Stock in Python
How to Screen Tech Stocks by Revenue Growth in Python
How to Screen Stocks by Balance Sheet Health in Python
Is "Sell in May" Real? SPY Monthly Seasonality Over 10 Years
How to Compare Sector Performance YTD Using Python
How to Screen Dividend Stocks by Yield and Quality in Python
How to Calculate Max Drawdown and Recovery Time for Any Stock in Python
How to Compare Profitability Across Mega-Cap Tech Stocks in Python
Why Ticker Symbols Are Unreliable: The Recycling Problem Every Quant Should Know
How to Calculate and Compare Stock Volatility in Python
How to Screen Blue-Chip Stocks by P/E Ratio in Python
How to Track Companies Through Ticker Changes, Bankruptcies, and Renames in Python
S&P 500 Turnover: How Much the Index Has Changed Since 2010
How to Calculate Stock Beta and Correlation in Python
← All articles

How Are Shares Outstanding Reported (and Why They Disagree)

A public company reports several different share counts in the same filing, and none of them is wrong. The balance sheet gives the number issued and outstanding on the last day of the period. The income statement gives a weighted average across the period, in a basic version and a diluted version, and those two drive earnings per share. The cover page gives a third figure, dated a few weeks after the period ended. Any of these can end up behind a field labelled “shares outstanding”, which is why two providers quoting the same company for the same quarter can differ by two percent, or by a factor of ten if a stock split fell in between.

What share counts does a filing actually contain?

Five fields cover almost every question anyone asks about share counts, and they answer different questions.

shares_outstanding is the count issued and held by investors on the period end date. common_shares_issued includes shares the company has bought back and holds in treasury; treasury_shares is that repurchased block on its own. Issued minus treasury equals outstanding, for companies that hold treasury stock rather than retiring it.

The other two are averages, not snapshots. weighted_avg_shares_basic averages the outstanding count across the reporting period, weighted by the number of days each level was in force. weighted_avg_shares_diluted adds the shares that would exist if options, restricted stock units, and convertible securities were settled. Accounting rules require the weighted averages in the EPS denominator, because profit accrues over a period while a share count exists at an instant.

Apple in fiscal 2024 shows the spread clearly:

import xfinlink as xfl

xfl.set_api_key("YOUR_API_KEY")  # free at https://xfinlink.com/signup

f = xfl.fundamentals("AAPL", start="2024-01-01", end="2024-12-31",
                     period_type="annual",
                     fields=["shares_outstanding", "common_shares_issued",
                             "weighted_avg_shares_basic",
                             "weighted_avg_shares_diluted"])
print(f.iloc[0])
AAPL FY2024 (period_end 2024-09-28)
  shares_outstanding            15,116.8 M
  common_shares_issued          15,116.8 M
  weighted_avg_shares_basic     15,343.8 M
  weighted_avg_shares_diluted   15,408.1 M
  diluted vs outstanding            1.93%

Three numbers, one fiscal year, 291.3 million shares between the smallest and the largest. Apple retires repurchased stock instead of parking it in treasury, so issued and outstanding are identical. The basic average sits above the year-end count because buybacks ran through the year and the average still carries the shares that existed in October 2023. The diluted figure adds 64.3 million for unvested equity awards.

Which count belongs in which calculation?

Earnings per share needs a weighted average, and it needs the matching one: basic EPS over basic shares, diluted EPS over diluted shares. Dividing net income by the period-end count produces a number that is close to reported EPS and not equal to it, which is the usual reason a hand-computed EPS fails to reconcile.

Market capitalisation needs the opposite. Price is an instantaneous quantity, so it pairs with the share count at that instant, not with an average over the preceding year. In the xfinlink metrics endpoint that rule is explicit: market_cap is close price times shares_outstanding, and market_cap_diluted is close price times weighted_avg_shares_diluted, kept as a separate field rather than blended into one. Book value per share, cash per share, and the rest of the per-share family all divide by the outstanding count.

Why does the count jump tenfold after a stock split?

Because the filing said so. Share counts in company filings are as-filed: they carry the value the company printed on the filing date, with no retroactive restatement for splits that happened afterwards. NVIDIA split ten for one on 7 June 2024, and the quarterly balance sheets step across it:

NVDA 2024-01-28  shares_outstanding      2,464 M
NVDA 2024-04-28  shares_outstanding      2,460 M
NVDA 2024-07-28  shares_outstanding     24,530 M
NVDA 2024-10-27  shares_outstanding     24,490 M

This is a feature of the record, not a defect in it. Restating the April count to a post-split basis would make that row disagree with NVIDIA’s own 10-Q, and it would break every calculation that pairs the count with an as-traded price from April. The two sides have to sit on the same basis, and the filing basis is the one that reconciles to the source document.

The daily price series carries its own contemporaneous share count, which steps on the split date alongside the price. Pairing them gives the right answer at every point in history:

NVDA 2024-06-28 close $123.54
  price-file share count  24,568,840,000
  market cap             $3.035 T
  using the April balance-sheet count $0.304 T

Off by a factor of ten, which is what a split does to anyone who mixes bases. Reconstructing an old market cap correctly means taking the price and the share count from the same date. If a split-adjusted share history is what you want instead, multiply the as-filed count by the cumulative product of split_ratio for every split after the period end date; the price series carries split_ratio for that purpose. The same trap appears in historical P/E ratios, covered in Split Adjustment Explained.

Why do two websites show different counts for the same company?

Four reasons, roughly in order of how often they bite.

The first is field choice, which the section above covers. The second is dating: SEC Form 10-Q cover pages report the share count as of the latest practicable date, typically several weeks after the balance sheet date, so a cover-page count and a balance-sheet count for the same quarter legitimately differ.

Third is free float. Outstanding counts every share in existence; float excludes insider holdings, strategic stakes, and restricted stock. Index providers weight by float, so a float-based count runs below the outstanding count, sometimes far below for a founder-controlled company. Two sources are not contradicting each other when one reports each.

Fourth is share classes. A company with Class A and Class C stock files one balance sheet, and the issuer-level count adds the classes together. Alphabet reports 12,211 million shares outstanding for fiscal 2024 across all classes, which will not match a per-class figure quoted for GOOGL alone.

Where can you pull a share-count history?

For a single symbol, yfinance exposes Ticker.get_shares_full(start, end), which returns a share-count time series (as of August 2026, per its API reference). That is enough for a quick look at one company.

Panel work has a different requirement: the count, the filing date it arrived on, and a price on a matching basis, for many companies at once. xfl.fundamentals() returns all five share fields with period_end and filing_date on every row, xfl.prices() returns the daily contemporaneous count next to close and split_ratio, and xfl.metrics() returns market cap already computed on the correct pairing. All three are filing-derived, so the numbers reconcile back to the 10-K or 10-Q they came from. The free tier covers one ticker per request with twelve months of history, which is enough to check the reconciliation yourself before committing to anything.

FAQ

Is shares outstanding the same as free float?
No. Outstanding includes every issued share held by investors; float excludes insider and strategic holdings. Float is the smaller number and the one index providers use for weighting.

Which share count should I use for market cap?
The outstanding count on the same date as the price. Averages belong in EPS, not in market cap.

Why does my computed EPS not match the reported figure?
Most likely the denominator. Reported EPS divides by a weighted average across the period, not by the period-end count.

Are share counts in filings adjusted for later splits?
Not in the source documents, and not in as-filed data. To move a count onto today’s basis, compound the split ratios that occurred after the period end date.

Built with xfinlink — free financial data API for Python. pip install -U xfinlink

Built with xfinlink — free financial data API for Python. pip install -U xfinlink
← All articles