The cost of capital is the expense incurred in obtaining funds through debt or equity for investment, influenced by its components including cost of debt, preferred stock, equity, and retained earnings. Each component has its calculation method, with examples illustrating how to determine after-tax costs and weighted average cost of capital (WACC). Factors affecting these costs include controllable elements like capital structure and investment policy, as well as uncontrollable factors like interest and tax rates.