This free tool allows you to determine whether you should use the www. or non www version of your domain as the canonical version based on your external link profile.
If you have just created a website or done a duplicate content check and now realize that you need to redirect either to the www version of your domain or the non www to prevent duplicate content, how do you decide? Here is a simple tool to make that calculation for you. It looks at the backlinks you currently have pointing to the non www vs. the www version of your site, and determines which one you should stick with.