NEW YORK (TheStreet) -- Dividends are an important part of investing for long-term growth, but the mechanics of how they're paid can be confusing for investors of any level. The one question I hear most often about dividend stocks is: When do I have to buy a stock in order to receive its dividend payout?

The answer is a bit complicated. This date is not included in the company's announcement of a dividend, and it's not published on the quote pages of TheStreet, Yahoo! Finance or even the expensive Bloomberg terminal on my desk.

Over a decade ago, I coined the term "must-own date." Terms such as "record date" and "ex-date" are commonly thrown around in dividend parlance, but the must-own date provides the simple answer that most folks want: the date by which they need to buy a dividend stock.

Here's how to determine the must-own date for any dividend so that you'll never be confused by this important question again.

When most dividends are announced, the company generally says it is "payable to shareholders of record as of" a certain date. This is useful information, but investors often mistakenly assume that the record date is the date by which they need to purchase a stock in order to receive the dividend.

You see, stock trades actually settle three days after the fact, even if you're a frequent trader who buys and sells the same stock several times a day. That means that you need to buy a stock three days before the record date in order to qualify for the dividend.

Further complicating matters, the ex-date falls two trading days before the date by which you need to be a shareholder of record. We've established that the must-own date falls three days before the record date, so simple subtraction means that you must buy a stock one day before it goes ex-dividend.

Now that we know to subtract three days from the record date in order to determine the must-own date, let's apply this rule to a specific example. 

Lockheed Martin(LMT) - Get Report, which is a holding in the model portfolio of my Dividend Stock Advisor newsletter, declared its latest quarterly dividend of $1.50 a share. (The stock currently yields 2.9%.) The company will pay the dividend on Sept. 25 to shareholders of record as of Tues., Sept. 1.

Looking at the calendar, we can determine that the ex-date will be Friday, Aug. 28 (two trading days before the record date), and the must-own date will be Thursday, Aug. 27 (one day before the ex-date, or three days before the record date). Only investors as of the close of trading on Aug. 27 will receive the dividend.

You could have owned Lockheed for five years, but if you sell it on the must-own date, you will not receive the payment. On the other hand, even if you buy Lockheed shares in the final minutes of trading on Aug. 27, you will receive the full dividend.

At the open of trading on the ex-date, Aug. 28, Lockheed shares will be adjusted $1.50 cents lower. This is to reflect the dividend being taken out of the stock, but there's no penalty because of the adjustment.

With that in mind, an investor can technically buy Lockheed at 3:59 p.m. ET on Aug. 27 and sell it at 9:31 a.m. ET on Aug. 28 and still receive the dividend in their account on Sept. 25.

For more on dividend stocks and dividend investing, check out TheStreet's dividend investor center. And don't forget to bookmark our list of high-dividend stocks and ex-dividend date calendar. If you're new to dividend investing, check out my primer, "How to Invest in Dividend Stocks."

David Peltier is a research associate at TheStreet. In keeping with company editorial policy, he doesn't own or short individual stocks. He also doesn't invest in hedge funds or other private investment partnerships. Under no circumstances does the information in this column represent a recommendation to buy or sell stocks. Peltier appreciates your feedback;

click here

to send him an email.