How to calculate the rate of return on selling a stock?
You probably want the Internal Rate of Return (IRR), see http://en.wikipedia.org/wiki/Internal_rate_of_return which is the compound interest rate that would produce your return. You can compute it in a spreadsheet with XIRR(), I made an example: https://spreadsheets.google.com/ccc?key=0AvuTW2HtDQfYdEsxVlM0RFdrRk1QS1hoNURxZkVFN3c&hl=en You can also use a financial calculator, or there are probably lots of web-based calculators such as the ones people have mentioned. Simple math. Take the sale proceeds (after trade expenses) and divide by cost. Subtract 1, and this is your return. For example, buy at 80, sell at 100, 100/80 = 1.25, your return is 25%. To annualize this return, multiply by 365 over the days you were in that stock. If the above stock were held for 3 months, you would have an annualized return of 100%.  There's an alternative way to annualize, in the same example above take the days invested and dive into 365, here you get 4. I suggested that 25% x 4 = 100%. Others will ask why I don't say 1.25^4 = 2.44 so the return is 144%/yr. (in other words, compound the return, 1.25x1.25x...) A single day trade, noon to noon the next day returning just 1%, would multiply to 365% over a year, ignoring the fact there are about 250 trading days. But 1.01^365 is 37.78 or a 3678% return. For long periods, the compounding makes sense of course, the 8%/yr I hope to see should double my money in 9 years, not 12, but taking the short term trades and compounding creates odd results of little value. If annualized rate of return is what you are looking for, using a tool would make it a lot easier.   In the post I've also explained how to use the spreadsheet.   Hope this helps.
Technically you should take the quarterly dividend yield as a fraction, add one, take the cube root, and subtract one (and then multiple by the stock price, if you want a dollar amount per share rather than a rate).  This is to account for the fact that you could have re-invested the monthly dividends and earned dividends on that reinvestment. However, the difference between this and just dividing by three is going to be negligible over the range of dividend rates that are realistically paid out by ordinary stocks. Well, one can easily have rates below -100%.  Suppose I start with $100, and end up with $9 after a year. What was my rate of return? It could be -91%, -181%, -218%, or -241%, or something else, depending on the compounding method.  We always have that the final amount equals the initial amount times a growth factor G, and we can express this using a rate r and a day count fraction T. In this case, we have T = 1, and B(T) = B(0) * 0.09, so: So, depending on how we compound, we have a rate of return of -91%, -181%, -218%, or -241%. This nicely illustrates that: The price-earnings ratio is calculated as the market value per share divided by the earnings per share over the past 12 months. In your example, you state that the company earned $0.35 over the past quarter. That is insufficient to calculate the price-earnings ratio, and probably why the PE is just given as 20. So, if you have transcribed the formula correctly, the calculation given the numbers in your example would be: 0.35 * 4 * 20 = $28.00 As to CVRR, I'm not sure your PE is correct. According to Yahoo, the PE for CVRR is 3.92 at the time of writing, not 10.54. Using the formula above, this would lead to: 2.3 * 4 * 3.92 = $36.06 That stock has a 52-week high of $35.98, so $36.06 is not laughably unrealistic. I'm more than a little dubious of the validity of that formula, however, and urge you not to base your investing decisions on it. In order to calculate the ratio you are looking for, just divide total debt by the market capitalization of the stock. Both values can be found on the link you provided. The market capitalization is the market value of equity. "Below I will try to explain two most common Binomial Option Pricing Models (BOPM) used. First of all, BOPM splits time to expiry into N equal sub-periods and assumes that in each period the underlying security price may rise or fall by a known proportion, so the value of an option in any sub-period is a function of its possible values in the following sub period. Therefore the current value of an option is found by working backwards from expiry date through sub-periods to current time. There is not enough information in the question from your textbook so we may assume that what you are asked to do is to find a value of a call option using just a Single Period BOPM. Here are two ways of doing this: First of all let's summarize your information: Current Share Price (Vs) = $70 Strike or exercise price (X) = $60 Risk-free rate (r) = 5.5% or 0.055 Time to maturity (t) = 12 months Downward movement in share price for the period (d) = $65 / $70 = 0.928571429 Upward movement in share price for the period (u) = 1/d = 1/0.928571429 = 1.076923077 ""u"" can be translated to $ multiplying by Vs => 1.076923077 * $70 = $75.38 which is the maximum probable share price in 12 months time. If you need more clarification here - the minimum and maximum future share prices are calculated from stocks past volatility which is a measure of risk. But because your textbook question does not seem to be asking this - you probably don't have to bother too much about it yet. Intrinsic Value: Just in case someone reading this is unclear - the Value of an option on maturity is the difference between the exercise (strike) price and the value of a share at the time of the option maturity. This is also called an intrinsic value.  Note that American Option can be exercised prior to it's maturity in this case the intrinsic value it simply the diference between strike price and the underlying share price at the time of an exercise. But the Value of an option at period 0 (also called option price) is a price you would normally pay in order to buy it. So, say, with a strike of $60 and Share Price of $70 the intrinsic value is $10, whereas if Share Price was $50 the intrinsic value would be $0. The option price or the value of a call option in both cases would be fixed.  So we also need to find intrinsic option values when price falls to the lowest probable and rises to the maximum probable (Vcd and Vcu respectively) (Vcd) = $65-$60 = $5 (remember if Strike was $70 then Vcd would be $0 because nobody would exercise an option that is out of the money) (Vcu) = $75.38-$60 = $15.38 1. Setting up a hedge ratio:  h = Vs*(u-d)/(Vcu-Vcd) h = 70*(1.076923077-0.928571429)/(15.38-5) = 1 That means we have to write (sell) 1 option for each share purchased in order to hedge the risks. You can make a simple calculation to check this, but I'm not going to go into too much detail here as the equestion is not about hedging. Because this position is risk-free in equilibrium it should pay a risk-free rate (5.5%). Then, the formula to price an option (Vc) using the hedging approach is: (Vs-hVc)(e^(rt))=(Vsu-hVcu) Where (Vc) is the value of the call option, (h) is the hedge ratio, (Vs) - Current Share Price, (Vsu) - highest probable share price, (r) - risk-free rate, (t) - time in years, (Vcu) - value of a call option on maturity at the highest probable share price. Therefore solving for (Vc): (70-1*Vc)(e^(0.055*(12/12))) = (75.38-1*15.38) => (70-Vc)*1.056540615 = 60 => 70-Vc = 60/1.056540615 => Vc = 70 - (60/1.056540615)  Which is similar to the formula given in your textbook, so I must assume that using 1+r would be simply a very close approximation of the formula above. Then it is easy to find that Vc = 13.2108911402 ~ $13.21 2. Risk-neutral valuation: Another way to calculate (Vc) is using a risk-neutral approach. We first introduce a variable (p) which is a risk-neutral probability of an increase in share price. p = (e^(r*t)-d)/(u-d) so in your case: p = (1.056540615-0.928571429)/(1.076923077-0.928571429) = 0.862607107 Therefore using (p) the (Vc) would be equal: Vc = [pVcu+(1-p)Vcd]/(e^(rt)) => Vc = [(0.862607107*15.38)+(0.137392893*5)]/1.056540615 => Vc = 13.2071229185 ~ $13.21 As you can see it is very close to the hedging approach. I hope this answers your questions. Also bear in mind that there is much more to the option pricing than this. The most important topics to cover are: Multi-period BOPM Accounting for Dividends Black-Scholes-Merton Option Pricing Model" "You can calculate the ""return on investment"" using libreoffice, for example. Look at the xirr function. You would have 2 columns, one a list of dates (ie the dates of the deposits or dividends or whatever that you want to track, the last entry would be today's date and the value of the investment today. The xirr function calculates the internal rate of return for you. If you add money to the account, and the current value includes the original investment and the added funds, it will be difficult to calculate the ROI. If you add money by purchasing additional shares (or redepositing dividends by buying additional shares), and you only want to track the ROI of the initial investment (ignoring future investments), you would have to calculate the current value of all of the added shares (that you don't want to include in the ROI) and subtract that value from the current total value of the account. But, if you include the dates and values of these additional share purchases in the spreadsheet, xirr will calculate the overall IRR for you." "For a retail investor who isn't a Physics or Math major, the ""Beta"" of the stock is probably the best way to quantify risk.  Examples: A Beta of 1 means that a stock moves in line with the market. Over 1 means that you would expect the stock to move up or down faster than the market as a whole. Under 1 means that you would expect the stock to move slower than the market as a whole." Securities change in prices. You can buy ten 10'000 share of a stock for $1 each one day on release and sell it for $40 each if you're lucky in the future for a gross profit of 40*10000 = 400'0000 "Generally if you are using FIFO (first in, first out) accounting, you will need to match the transactions based on the number of shares. In your example, at the beginning of day 6, you had two lots of shares, 100 @ 50 and 10 @ 52.  On that day you sold 50 shares, and using FIFO, you sold 50 shares of the first lot.  This leaves you with 50 @ 50 and 10 @ 52, and a taxable capital gain on the 50 shares you sold. Note that commissions incurred buying the shares increase your basis, and commissions incurred selling the shares decrease your proceeds.  So if you spent $10 per trade, your basis on the 100 @ 50 lot was $5010, and the proceeds on your 50 @ 60 sale were $2990.  In this example you sold half of the lot, so your basis for the sale was half of $5010 or $2505, so your capital gain is $2990 - 2505 = $485. The sales you describe are also ""wash sales"", in that you sold stock and bought back an equivalent stock within 30 days.  Generally this is only relevant if one of the sales was at a loss but you will need to account for this in your code.  You can look up the definition of wash sale, it starts to get complex. If you are writing code to handle this in any generic situation you will also have to handle stock splits, spin-offs, mergers, etc. which change the number of shares you own and their cost basis.  I have implemented this myself and I have written about 25-30 custom routines, one for each kind of transaction that I've encountered.  The structure of these deals is limited only by the imagination of investment bankers so I think it is impossible to write a single generic algorithm that handles them all, instead I have a framework that I update each quarter as new transactions occur." What you're missing is the continuous compounding computation doesn't work that way.  If you compound over n periods of time and a rate of return of r, the formula is e^(r*n), as you have to multiply the returns together with a mulitplicative base of 1.  Otherwise consider what 0 does to your formula.  If I get a zero return, I have a zero result which doesn't make sense.  However, in my formula I'd still get the 1 which is what I'm starting and thus the no effect is the intended result. Continuous compounding would give e^(-.20*12) = e^(-2.4) = .0907 which is a -91% return so for each $100 invested, the person ends up with $9.07 left at the end.  It may help to picture that the function e^(-x) does asymptotically approach zero as x tends to infinity, but that is as bad as it can get, so one doesn't cross into the negative unless one wants to do returns in a Complex number system with imaginary numbers in here somehow. For those wanting the usual compounding, here would be that computation which is more brutal actually: For your case it would be (1-.20)^12=(0.8)^12=0.068719476736 which is to say that someone ends up with 6.87% in the end.  For each $100 had in the beginning they would end with $6.87 in the end. Consider someone starting with $100 and take 20% off time and time again you'd see this as it would go down to $80 after the first month and then down to $64 the second month as the amount gets lower the amount taken off gets lower too.  This can be continued for all 12 terms.  Note that the second case isn't another $20 loss but only $16 though it is the same percentage overall. Some retail stores may do discounts on discounts so this can happen in reality.  Take 50% off of something already marked down 50% and it isn't free, it is down 75% in total.  Just to give a real world example where while you think a half and a half is a whole, taking half and then half of a half is only three fourths, sorry to say.  You could do this with an apple or a pizza if you want a food example to consider. Alternatively, consider the classic up and down case where an investment goes up 10% and down 10%.  On the surface, these should cancel and negate each other, right?  No, in fact the total return is down 1% as the computation would be (1.1)(.9)=.99 which is slightly less than 1. Continuous compounding may be a bit exotic from a Mathematical concept but the idea of handling geometric means and how compounding returns comes together is something that is rather practical for people to consider. "You'll generally get a number close to market cap of a mature company if you divide profits (or more accurately its free cash flow to equity) by the cost of equity which is usually something like ~7%.    The value is meant to represent the amount of cash you'd need to generate investment income off it matching the company you're looking at. Imagine it as asking ""How much money do I need to put into the bank so that my interest income would match the profits of the company I'm looking at"". Except replace the bank with the market and other forms of investments that generate higher returns of course and that value would be lower." Thanks for showing me that. I can see it now. I have always used my formula, and even a senior at another company confirmed the way I calculated the returns.   Luckily, I do not work with that manager, and he has his own model, and so do I. But he was pretty cool about it when I asked about his calculations. "So, there is no truly ""correct"" way to calculate return.  Professionals will often calculate many different rates of return depending on what they wish to understand about their portfolio.  However, the two most common ways of calculating multi-period return though are time-weighted return and money-weighted return. I'll leave the details to this good Investopeadia article, but the big picture is time-weighted returns help you understand how the stock performed during the period in question independent of how you invested it it.  Whereas money-weighted return helps you understand how you performed investing in the stock in question.  From your question, it appears both methods would be useful in combination to help you evaluate your portfolio. Both methods should be fairly easy to calculate yourself in a spread sheet, but if you are interested there are plenty of examples of both in google docs on the web." One thing to keep in mind when calculating P/E on an index is that the E (earnings) can be very close to zero.  For example, if you had a stock trading at $100 and the earnings per share was $.01, this would result in a P/E of 10,000, which would dominate the P/E you calculate for the index.  Of course negative earnings also skew results. One way to get around this would be to calculate the average price of the index and the earnings per share of the index separately, and then divide the average price of the index by the average earnings per share of the index. Different sources calculate these numbers in different ways.  Some throw out negative P/Es (or earnings per share) and some don't.  Some calculate the price and earnings per share separate and some don't, etc... You'll need to understand how they are calculating the number in order to compare it to PEs of individual companies. "at $8.50:  total profit = $120.00 *basis of stock, not paid in cash, so not included in ""total paid"" at $8.50: total profit = $75.00"