Dividends should never be your sole reason to buy a stock as they can change from year to year depending on the prospects and performance of the company, meaning they are never set in stone. As has been the case with blue chips like BHP Billiton Limited (ASX: BHP), Rio Tinto Limited (ASX: RIO) and Woolworths Limited (ASX: WOW), no company is immune to dividend cuts when times are tough, thus buying even the best of companies for their dividends is fraught with danger.

Nevertheless, dividends form part of a shareholder’s total return, meaning the dividend received will often provide a boost to the capital gains of a company when calculating returns. Accordingly, the view I take is that a company should only be bought for its dividend, if and when it also has positive underlying prospects, or the share price is relatively cheap.

With earnings season well and truly behind us, there are a fair few stocks about to trade on an ex-entitlement (XD) basis, meaning investors can boost their returns on solid companies by buying before they trade ex-dividend.

Australia and New Zealand Banking Corporation (ASX: ANZ) and Retail Food Group Limited (ASX: RFG) are two that I think everyone should be watching.

ANZ Bank

Whilst not strictly trading on a cum dividend basis (yet), management has indicated that ANZ will pay an interim dividend in the first half of 2016. According to its key dates for the financial year released in January this year, ANZ expects its securities will trade on an ex-dividend basis on 9 May 2016, meaning investors have approximately two months before the stock trades ex-dividend.

Although the amount of the dividend is unknown at present, the group reported a mixed first quarter trading update with cash profits growing 5% to $1.85 billion. Given this growth in cash earnings (which will fund the dividend), I expect ANZ should be able to maintain its prior year interim dividend of 86 cents fully-franked for the upcoming period. Despite noting that the bank flagged weakness in select divisions, mainly due to weaker growth in its Asian markets, the current price-to-earnings of just under 10 indicates it is relatively inexpensive compared to peers Commonwealth Bank of Australia (ASX:CBA), National Australia Bank Ltd (ASX: NAB) and Westpac Banking Corp  (ASX: WBC), which all command higher multiples.

Accordingly, a purchase at current prices potentially provides solid capital upside (if results come out better than expected) and an estimated fully-franked yield of 7.2%.

Retail Food Group

Retail Food Group provided a better-than-expected trading update, reporting underlying net profit after tax (NPAT) increased 27.1% to $32.1 million (versus an expected 25%). The group reaffirmed full year underlying NPAT growth of 20% year-on-year, and more impressively, upped its interim dividend for the nineteenth consecutive time to 13 cents fully-franked – a 13% increase on prior year.

Although the share price has responded positively since reporting, surging almost 25% higher since results, Retail Food Group still trades on a very respectable trailing yield of 4.5%, fully-franked. If the group increases the final dividend, which is very likely given the strong growth and track record, this yield should increase.

Accordingly, despite not being the cheapest stock going around, the company has strong growth potential akin to Collins Foods Ltd (ASX: CKF) and Domino’s Pizza Enterprises Ltd. (ASX: DMP), making it one stock to buy before it trades ex-dividend on 17 March 2016.

If you're after more dividend ideas, don't forget to check out our BRAND NEW report - Our Top Dividend Stock for 2016!

Our resident dividend expert names his Top Dividend Share for 2016. Not only are the shares dirt cheap, the company is trading on a 5.6% fully franked dividend yield. Simply click here to gain access to this comprehensive FREE investment report, including the name of this fast growing ASX dividend share. No credit card required!

HOT OFF THE PRESSES: Motley Fool’s #1 Dividend Pick for 2017!

With its shares up 155% in just the last five years, this ‘under the radar’ consumer favourite is both a hot growth stock AND our expert’s #1 dividend pick for 2017. Now we’re pulling back the curtain for you... And all you have to do to discover the name, code and a full analysis is enter your email below!

Simply enter your email now to receive your copy of our brand-new FREE report, “The Motley Fool’s Top Dividend Stock for 2017.”

By clicking this button, you agree to our Terms of Service and Privacy Policy. We will use your email address only to keep you informed about updates to our website and about other products and services we think might interest you. You can unsubscribe from Take Stock at anytime. Please refer to our https://www.fool.com.au/financial-services-guide">Financial Services Guide (FSG) for more information.

Motley Fool contributor Rachit Dudhwala owns shares of Australia and New Zealand Banking Group. Unless otherwise noted, the author does not have a position in any stocks mentioned by the author in the comments below. The Motley Fool Australia owns shares of Retail Food Group Limited. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy. This article contains general investment advice only (under AFSL 400691). Authorised by Bruce Jackson.