How to get dividend history, ex-dates and yield into Google Sheets

GOOGLEFINANCE has no dividend fields. An add-on, a CSV endpoint for IMPORTDATA or a short Apps Script fills the gap, each with its own cost.

GOOGLEFINANCE cannot do it: none of the attributes Google documents is a dividend. Wisesheets returns each payment with ex, pay and declaration dates from one formula, for 60 dollars a year. Free, Alpha Vantage's dividends endpoint returns CSV that IMPORTDATA reads, declared payments included, at 25 requests a day. EODHD needs a few lines of Apps Script. What breaks is the yield: trailing or forward, special dividends in or out.

The short way

GOOGLEFINANCE will not do this. Google's own help page lists every attribute the function takes — nineteen live ones from price and marketcap to pe, eps, beta and shares, and six historical ones from open to volume — and none of them is a dividend, a yield or an ex-date. Whatever else you build, the price can still come from GOOGLEFINANCE; the dividends have to come from somewhere else.

The shortest somewhere else is Wisesheets. Its documentation gives one function for the whole payment history:

=WISEPRICE("KO", "dividend")
=WISEPRICE("KO", "dividend", , "01/01/2020", "01/01/2026")
=WISE("KO", "Dividend", 2025)

The first returns every payment with its ex-date, the amount, the split-adjusted amount, the payment date and the declaration date. The second limits it to a date range. The third is the sum of the payments made in that year. INDEX(WISEPRICE("KO", "dividend"),,2) pulls a single column out of the table. It is $60 a year, billed annually, with no free plan, and the licence is for one person.

If the budget is zero and the list is short, Alpha Vantage's DIVIDENDS endpoint is on the free key and its documentation accepts datatype=csv, which is the one format IMPORTDATA reads:

=IMPORTDATA("https://www.alphavantage.co/query?function=DIVIDENDS&symbol=KO&datatype=csv&apikey=YOUR_API_KEY")

The endpoint returns historical and declared future distributions with an ex-date, declaration date, record date, payment date and amount, so the newest row is the next ex-date as soon as the company has announced it. The free key allows 25 requests a day, which is the whole budget for the whole sheet.

What the options are

An add-in that knows about dividends. Wisesheets as above, in Google Sheets and Excel with the same functions. Its data list also has an "Expected Dividend" heading next to dividend history and dividend per share, though the documentation does not say what that field contains. Every function takes ranges, so one formula can cover a column of tickers.

An add-in that knows about your portfolio. Stock Events Pro, at $49.99 a year, ships a Sheets add-on and an Excel add-in that sign in to your Stock Events account. STOCKEVENTS_STOCK_DIVIDEND_YIELD("KO") returns what its help page calls the trailing annual dividend yield; STOCKEVENTS_DIVIDENDS_INCOME("My Portfolio"), STOCKEVENTS_DIVIDENDS_YIELD and STOCKEVENTS_DIVIDENDS_YIELD_ON_COST return projected annual income, the weighted yield and yield on cost for a portfolio you keep in the app. There is no function for an ex-date, a payment date or the payment history; the help page lists none, and those stay in the app's calendar.

A free endpoint behind IMPORTDATA. Alpha Vantage as above. Its official Sheets add-on is not the way in here: the add-on's function reference has sixteen functions and no dividend function. The nearest, AVGetCompanyOverview, wraps the company overview endpoint, which returns a dividend per share, a dividend yield, an ex-dividend date and a dividend date — and which the API documentation, read on 8 October 2026, marks as a premium function. A free key gets the history, not the summary.

A paid endpoint and a few lines of script. EODHD serves dividend history back to 1970 at one API call per ticker however many rows come back, on its $19.99 end-of-day plan. Its Sheets add-on is formula-free — a sidebar with a Get Data button — and its listing names prices and fundamentals, not dividends. The CSV the endpoint returns by default has exactly two columns, Date and Dividends, and the amount in it is the split-adjusted one; the declaration, record and payment dates, the amount as paid and the currency are in the JSON only. IMPORTDATA cannot read JSON, so this is the job for a custom function. In Extensions → Apps Script:

// Run setKey() once from the editor, then delete your key from this line.
function setKey() {
  PropertiesService.getUserProperties().setProperty('EODHD_KEY', 'YOUR_API_KEY');
}

/**
 * Dividend history for one ticker, e.g. =EODHD_DIVIDENDS("KO.US", "2020-01-01")
 * @customfunction
 */
function EODHD_DIVIDENDS(symbol, from) {
  const key = PropertiesService.getUserProperties().getProperty('EODHD_KEY');
  const url = 'https://eodhd.com/api/div/' + encodeURIComponent(symbol) +
    '?fmt=json&from=' + from + '&api_token=' + key;
  const rows = JSON.parse(UrlFetchApp.fetch(url).getContentText());
  const day = s => (s ? new Date(s + 'T00:00:00') : '');
  const out = [['Ex-date', 'Declared', 'Record', 'Paid', 'Amount paid', 'Adjusted', 'Currency']];
  rows.forEach(r => out.push([day(r.date), day(r.declarationDate), day(r.recordDate),
    day(r.paymentDate), r.unadjustedValue, r.value, r.currency]));
  return out;
}

=EODHD_DIVIDENDS("KO.US", "2020-01-01") then spills a table into the empty cells below and to the right. Google's custom-function guide allows UrlFetchApp and the user-properties store in a custom function, caps each call at 30 seconds, and lets it return a two-dimensional array. A blank date means EODHD has none — by its own account, record dates are almost always empty for European listings.

For the next ex-date, EODHD has a separate calendar endpoint, calendar/dividends, which returns dates and symbols only — no amounts — answers in JSON whatever you ask for, and comes with the All-In-One and Fundamentals plans rather than the $19.99 one.

A yield from the history. With a dividend table in columns A to G as above and the price from GOOGLEFINANCE, a trailing twelve-month yield is one formula:

=SUMIFS(F:F, A:A, ">="&EDATE(TODAY(), -12)) / GOOGLEFINANCE("NYSE:KO", "price")

Column F is the split-adjusted amount, which is the one that belongs beside today's price. Use column E, the amount as paid, only for cash you received.

Where this breaks

IMPORTXML on a quote page. The formula that scrapes a dividend cell out of a finance website works until the site changes its markup, and then returns #N/A with no warning — and the fix is a new XPath, again, every time. It is also usually not allowed: Yahoo's terms of service, last updated 4 August 2026, forbid collecting data from its services "using any automated means … including but not limited to robots, spiders, scrapers" without prior permission. A sheet that refreshes the scrape every hour is that.

IMPORTDATA spends a quota you cannot see. Google says the import functions check for updates every hour while the document is open, whether or not anything in the sheet changed. Twenty tickers on Alpha Vantage's free key is twenty requests per check against an allowance of 25 a day, so the second hourly check is already over it, and the cells fill with the API's refusal instead of dividends. Google also throttles import functions across all the documents you have open, with a "Loading data may take a large number of requests" error.

A key in a URL is a key in the sheet. IMPORTDATA("…&apikey=…") puts the key in a formula that anyone with view access can read. A key typed into a bound Apps Script travels with every copy anyone makes of the file. The user-properties store in the script above stays with your account. Sharing access is a licence question as well: Wisesheets' and EODHD's terms both forbid it on their personal plans, so read redistribution before the sheet goes to anyone else.

Trailing and forward are different numbers, both right. Sum the last twelve months and a company that just raised its dividend looks cheaper than one that annualises the new rate; a company that cut looks better than it is. Change the formula above to the latest payment times four and the answer moves. Why dividend yield differs works through which numerator and which price each kind of site uses; the mechanical point here is to label the column with the definition, because a cell that just says "yield" will be compared with a number that means something else.

Special dividends wreck both. A one-off payment inside the twelve-month window inflates a trailing yield for a year, and if it is the latest payment, an annualised yield multiplies it by four. None of the CSVs here marks a payment as special. And a large one changes the date order: per the SEC's Investor.gov, when a dividend is 25% or more of the stock's value, the ex-date is deferred until one business day after the payment — so a sheet that assumes ex-date before payment date sorts that row wrongly.

Adjusted and unadjusted are both called "the dividend". Wisesheets returns both, EODHD's JSON returns both and its CSV returns only the adjusted one. After a split, the adjusted figure divided by today's price is a yield; the unadjusted figure divided by today's price is not. Split and dividend history as data has the arithmetic, and the spin-offs that show up as odd split ratios.

Foreign payers: the feed shows gross, the account shows net. Every source here reports the declared amount per share in the payer's currency, before any tax withheld at source. What lands in a brokerage account is less, and converted. EODHD's own documentation adds a trap for London listings: dividends are in pounds while the quote is in pence, so a yield worked out naively is out by a factor of a hundred. For the record of what you actually received, the broker statement wins; see tracking foreign dividends and withholding and withholding.

Declared is not paid. A future row is an announcement, and announcements change. Count income from the pay date once it has passed, not from the ex-dividend date of a payment that has not arrived.

If you outgrow this

When the sheet is really a ledger — what each broker paid you, net, in which currency — a dividend tracker does that job better than a formula. Tracking dividends across brokers covers which ones store gross, tax and exchange rate per payment, and the rest of the shelf is dividend trackers.

When the sheet is really a model — payout ratios, cash flow coverage, ten years of statements — the dividend columns are the small part of it, and fundamentals in a spreadsheet covers the add-ins built for that.

When GOOGLEFINANCE itself is the problem — professional use, an exchange it does not cover, a script that needs the history — what to use instead of GOOGLEFINANCE is the page for it, and everything with a spreadsheet add-in is on market data in Excel and Google Sheets.

The tools that do this

In the order this page recommends trying them. Paid placement does not affect this order.

  1. Wisesheets

    WISEPRICE(ticker, "dividend") returns ex, pay and declaration dates with raw and adjusted amounts. Sheets and Excel, $60 a year, no free plan.

    Financials, estimates and live prices as worksheet functions in Excel and Google Sheets.

    $60/yr

  2. Stock Events

    Pro's Sheets add-on returns a trailing yield per ticker; Sheets and Excel both give projected income per portfolio. No ex-date function. $49.99 a year.

    A dividend and earnings calendar wrapped around your holdings, phone first.

    $0.99/wkFree tier

  3. Alpha Vantage

    DIVIDENDS on the free key, declared future payments included, as CSV that IMPORTDATA reads. 25 requests a day, and its own add-on has no dividend function.

    The API most people's first script talks to — free key, wide coverage, hard rate limits.

    $49.99/moFree tier

  4. EODHD

    History back to 1970 from $19.99 a month. The CSV gives only a date and an adjusted amount; the other dates need JSON and a short Apps Script.

    End-of-day and fundamentals for 60+ exchanges worldwide, at a hobbyist price.

    $19.99/moFree tier

FAQ

Does GOOGLEFINANCE have a dividend yield attribute?

Not one Google documents. Its help page, read on 8 October 2026, lists nineteen real-time attributes, from price and market cap to P/E, EPS, beta and shares outstanding, and six historical ones, and none of them is a dividend, a yield or an ex-date. Attribute names that circulate on forums, such as yieldpct, are not on that list, so nothing promises what they return or that they will keep returning it.

Why is the yield in my sheet different from my broker's or Yahoo's?

Because yield is a choice of numerator and price, not a fact. A trailing yield adds up the last twelve months of payments; a forward yield annualises the latest one; either may include or exclude a special dividend. Stock Events documents its per-ticker function as a trailing annual yield. The guide on why dividend yield differs works through the cases.

Can I get the next ex-dividend date for free?

For a short list, yes. Alpha Vantage's dividends endpoint returns declared future distributions as well as history, on the free key, so the newest row is the next ex-date once the company has announced it. At 25 requests a day that covers a handful of tickers, refreshed rarely. EODHD's upcoming-dividends calendar returns dates only and sits on its pricier plans.

Does any of this work in Excel?

Wisesheets and Stock Events both ship Excel add-ins on the same subscription, and Wisesheets needs an Office 365 subscription before its functions work on desktop Excel. A CSV endpoint such as Alpha Vantage's can be read with Power Query's From Web instead of IMPORTDATA. STOCKHISTORY is no substitute — Microsoft documents it as date, close, open, high, low and volume only.

Sources

  1. GOOGLEFINANCE — Google Docs Editors Help — Google, read
  2. Learn more about Import functions — Google Docs Editors Help — Google, read
  3. Custom Functions in Google Sheets — Apps Script — Google,
  4. Wisesheets Documentation — Wisesheets, read
  5. Google Sheets Add-In — Stock Events Help — Stock Events, read
  6. Alpha Vantage API Documentation — Alpha Vantage, read
  7. Alpha Vantage Google Sheets Add-on — Spreadsheet Function Reference — Alpha Vantage, read
  8. Corporate Actions API: Dividend & Split History Since 1970 — EODHD, read
  9. Calendar API — Upcoming Earnings, IPOs, Splits and Dividends — EODHD, read
  10. Ex-Dividend Dates: When Are You Entitled to Stock and Cash Dividends — U.S. Securities and Exchange Commission (Investor.gov), read
  11. Yahoo Terms of Service — Yahoo,

The catalogue next door

This page names a handful of cards. The rest of them are in Dividend Trackers & Research, each filled in against the same schema, with the fields to narrow it yourself.

Last updated . Corrected in place: this is a reference page, not a dated post.

Report an error on this page

Quote the line and say what it should be.

The vendor’s page, filing or documentation that says otherwise.

Only if you want to hear back. Never published.

Read by a person. It fixes a fact and moves nothing else.