The 40 cheapest stocks, according to Goldman Sachs

Getty Images

It's probably safe to say that every investor is looking to buy stocks at a discount. The tough part, though, is knowing which stocks to buy and when.

In a note to clients, Goldman Sachs strategist David J. Kostin on Wednesday identified what he thinks are the top 40 most undervalued stocks. At the time he penned the note, each stock had at least 20 percent upside to his price target. What follows is his list:

  1. Marathon Petroleum (MPC)
  2. Autodesk (ADSK)
  3. Ventas (VTR)
  4. (CRM)
  5. American Tower (AMT)
  6. Simon Property Group (SPG)
  7. Halliburton (HAL)
  8. Devon Energy (DVN)
  9. Expedia (EXPE)
  10. Southwestern Energy (SWN)t
  11. Ryder System (R)
  12. Ensco (ESV)
  13. Broadcom (BRCM)
  14. Cameron International (CAM)
  15. Noble Energy (NBL)
  16. Wynn Resorts (WYNN)
  17. Wyndham Worldwide (WYN)
  18. Noble (NE)
  19. Vulcan Materials (VMC)
  20. Phillips 66 (PSX)
  21. Nabors Industries (NBR)
  22. Crown Castle International (CCI)
  23. Anadarko Petroleum (APC)
  24. Estee Lauder (EL)
  25. Newfield Exploration (NFX)
  26. First Solar (FSLR)
  27. General Motors (GM)
  28. Yahoo! (YHOO)
  29. Cerner (CERN)
  30. EOG Resources (EOG)
  31. Cognizant (CTSH)
  32. Goodyear Tire (GT)
  33. Qualcomm (QCOM)
  34. Monsanto (MON)
  35. Valero Energy (VLO)
  36. Schlumberger (SLB)
  37. Precision Castparts (PCP)
  38. Applied Materials (AMAT)
  39. Bristol-Myers Squibb (BMY)
  40. National Oilwell Varco (NOV)

—By CNBC's Drew Sandholm. Follow him on Twitter @DrewSandholm