Can You Sell on the Ex-Dividend Date?
Can you sell on the ex-dividend date and keep the dividend? Yes, if you owned the shares at the open. Here is the record date and settlement chain behind it.
Can you sell on the ex-dividend date and still collect the dividend? Yes. If you owned the shares when trading opened on the ex-dividend date, the payment is yours, and selling that same morning does not undo it. The cash lands weeks later, paid to whoever sat on the company's register on the record date, long after the stock itself has left the account.
Who gets the dividend: the three dates that decide it
Every cash dividend runs on three dates, and only the first two settle the question of who gets paid.
The ex-dividend date is the first session the stock trades without the dividend attached. Buy on that day or after it and the seller keeps the payment. The record date is the day the company reads its shareholder register and writes down who owns the stock. The pay date is when the cash reaches the accounts on that list, normally a few weeks on. Our guide to the ex-dividend date takes the first of the three apart on its own, and the record date versus the ex-dividend date covers how the pair get set.
The distance between those dates is wider than most readers expect. The panel below follows 8 large dividend payers through their most recent completed ex-dividend date, out to the day the money moves.
The exact SQL behind every number
SELECT
ticker,
formatDateTime(max(ex_dividend_date), '%b %e, %Y') AS ex_dividend,
formatDateTime(argMax(record_date, ex_dividend_date), '%b %e, %Y') AS record_books,
formatDateTime(argMax(pay_date, ex_dividend_date), '%b %e, %Y') AS cash_arrives,
dateDiff('day', max(ex_dividend_date), argMax(record_date, ex_dividend_date)) AS record_gap,
dateDiff('day', max(ex_dividend_date), argMax(pay_date, ex_dividend_date)) AS payout_wait
FROM global_markets.stocks_dividends
WHERE ticker IN ('AAPL', 'MSFT', 'JNJ', 'KO', 'PG', 'XOM', 'CVX', 'PEP')
AND ex_dividend_date >= today() - 200
AND ex_dividend_date <= today()
AND dateDiff('day', ex_dividend_date, record_date) BETWEEN 0 AND 7
AND dateDiff('day', ex_dividend_date, pay_date) BETWEEN 0 AND 120
GROUP BY ticker
ORDER BY payout_waitRead the ex-dividend column and the record column side by side: they carry the same date. The wait for the money is the part that stretches. It runs from 3 calendar days at AAPL out to 26 days at XOM, which went ex on May 15, 2026 and pays on Jun 10, 2026. A seller on the ex-date is long out of the stock by the time that cash moves.
Why a sale on the ex-date does not take the dividend back
Settlement is what ties the chain together. Settlement is the moment a trade legally transfers the shares and the money, which happens after the trade itself prints. US stocks settle T+1: one business day after the trade date. Our guide to T+1 settlement walks that timeline start to finish.
The register a company reads on the record date is a list of settled positions. A buyer needs a settled trade in hand by the record date to appear on it, which puts the last day to buy for the dividend one business day earlier. The exchange marks the next session as ex-dividend, and from that session the stock changes hands without the payment attached.
Now run the same logic on your own sale. You hold the stock through Tuesday's close. The stock goes ex on Wednesday morning and you sell at the open. Your sale settles on Thursday. The register was read on Wednesday, with your position still settled in your name, and you are on the list. Nothing that happens on Thursday edits a list written the day before.
The convention says the same thing from the buyer's side. Shares bought on or after the ex-date arrive without the dividend, at a price that already accounts for its absence, and the buyer knows it. That buyer is not owed your payment, and no one claws it back.
What T+1 settlement changed about these dates
That Wednesday-to-Thursday chain used to carry an extra day. Before May 28, 2024, US stocks settled T+2, and the ex-dividend date sat one business day ahead of the record date. Under T+1 the two dates collapsed onto the same calendar day. The panel counts every US dividend through 2024 that carries a usable record date, and measures the share whose record date and ex-dividend date land together.
The exact SQL behind every number
SELECT
formatDateTime(toStartOfMonth(ex_dividend_date), '%Y-%m') AS month,
round(100 * countIf(record_date = ex_dividend_date) / count(), 1) AS same_day_pct,
count() AS dividends_counted
FROM global_markets.stocks_dividends
WHERE ex_dividend_date BETWEEN toDate('2024-01-01') AND toDate('2024-12-31')
AND currency = 'USD'
AND dateDiff('day', ex_dividend_date, record_date) BETWEEN 0 AND 7
GROUP BY month
ORDER BY monthIn 2024-01, 0.2% of dividends had a record date sitting on the ex-dividend date. By 2024-12 the figure was 98.9%, across 5551 dividends in that month alone. The step in the middle of the year is the settlement change arriving.
The answer to the question survives both regimes. Under T+2, a sale on the ex-date settled two business days later, one day past the record date. Under T+1 it settles one business day later, again past the record date. Either way the register was already written with you on it.
Does the stock fall by the dividend on the ex-date?
There is a cost buried in the timing, and the opening print is where it shows. The panel below buckets every regular quarterly US dividend from 2024 and 2025 by its size against the previous close, then measures how far the ex-date open sat below that close, averaged inside each bucket.
The exact SQL behind every number
WITH px AS
(
SELECT
ticker,
date,
toFloat64(open) AS open_px,
volume,
toFloat64(any(close) OVER (PARTITION BY ticker ORDER BY date ROWS BETWEEN 1 PRECEDING AND 1 PRECEDING)) AS prior_close
FROM global_markets.stocks_daily_aggs
WHERE date BETWEEN toDate('2023-12-15') AND toDate('2025-12-31')
),
ex AS
(
SELECT
ticker,
ex_dividend_date,
max(cash_amount) AS div_cash
FROM global_markets.stocks_dividends
WHERE ex_dividend_date BETWEEN toDate('2024-01-01') AND toDate('2025-12-31')
AND frequency = 4
AND cash_amount > 0
AND currency = 'USD'
GROUP BY ticker, ex_dividend_date
)
SELECT
multiIf(
div_pct < 0.25, 'under 0.25%',
div_pct < 0.50, '0.25% to 0.50%',
div_pct < 1.00, '0.50% to 1.00%',
div_pct < 2.00, '1.00% to 2.00%',
'over 2.00%') AS dividend_bucket,
count() AS sample_size,
round(avg(div_pct), 3) AS avg_dividend_pct,
round(avg(open_gap_pct), 3) AS avg_open_gap_pct
FROM
(
SELECT
100 * toFloat64(ex.div_cash) / px.prior_close AS div_pct,
100 * (px.prior_close - px.open_px) / px.prior_close AS open_gap_pct
FROM px
INNER JOIN ex ON px.ticker = ex.ticker AND px.date = ex.ex_dividend_date
WHERE px.prior_close >= 10
AND px.open_px > 0
AND px.volume >= 1000000
)
GROUP BY dividend_bucket
ORDER BY avg_dividend_pctThe two percentage columns move together down the table. In the over 2.00% bucket the dividend averaged 3.047% of the prior close and the open sat 2.651% below it, over 270 ex-dividend dates. In the under 0.25% bucket both figures shrink toward zero: 0.146% and 0.045%.
Averages are the only place that relationship looks tidy. On any single ex-date the overnight move carries everything else happening to the stock, and the dividend is one term inside a much noisier number. That arithmetic is the entire subject of the dividend capture strategy, where a trader buys ahead of the ex-date and sells into it.
The two cases where the cash is not a dividend
Two situations change what actually lands in the account.
The first is a short position. A short seller has borrowed shares and sold them, and on the record date the lender of those shares still expects the payment. The short seller owes it, and the debit appears in the short account around the pay date, matching the cash amount.
The second is stock lending. Brokers lend out shares held in margin accounts, and a lent share sits on someone else's books over the record date. The account that lent it receives a substitute payment, called a payment in lieu of dividend, equal to the cash. It is taxed as ordinary income rather than at qualified dividend rates. The dollar amount matches. The tax treatment does not.
Every borrowed share traces back to a real account somewhere. Short interest gives a floor under how many shares of a name are on loan at a given moment.
As of Jul 15, 2026, AAPL carried the largest short position in the group, 146.55 million shares, against average daily volume of 47.95 million. Every one of those shares was borrowed from an account that owns it, and each ex-date inside the window turned a dividend into a payment in lieu for whoever lent them.
FAQ
Can I sell on the ex-dividend date and still get the dividend?
Yes. Ownership at the open on the ex-dividend date is the whole test, and a sale that same day settles after the register has already been read on the record date. The cash arrives on the pay date weeks later, whether or not you still hold the stock.
What happens if I sell my shares before the ex-dividend date?
The buyer collects the dividend instead. A trade on the last session before the ex-date carries the dividend along to the new owner, which is exactly what the ex-date convention is built to sort out.
How long do I have to hold a stock to get its dividend?
There is no minimum holding period for the payment itself. Owning the shares before the ex-dividend date is enough. A separate US tax rule, roughly 61 days of holding inside a 121-day window around the ex-date, decides whether the payment is taxed at qualified dividend rates. That is a tax question rather than an entitlement question.
Does the share price fall on the ex-dividend date?
The opening price on the ex-date typically sits below the previous close by roughly the dividend. From that session the shares trade without the payment attached. The bucketed panel above measures the size of that gap, and it holds as an average tendency rather than a rule for any single morning.
What is a payment in lieu of a dividend?
It is a cash substitute paid to an account whose shares were on loan over the record date. The dollar amount matches the dividend. The tax treatment is ordinary income rather than qualified dividend rates, and a broker reports it as a separate line.
Every panel here ships with the SQL that produced it, so each date and each gap can be checked one row at a time. To see which names go ex next, the upcoming ex-dividend dates calendar keeps a running list, and the same questions can be asked in plain English on the Strasmore terminal.