Questions:
What is the formula for NPV?

I have two investment opportunities to invest my $950. My required rate of return is 5%. The first opportunity returns $370.5 for the next three years whereas the second opportunity provides $427.5 in the first year, $370.5 in the second year and $304.0125 in the third year. 

Which opportunity is better?

Reference answers:
NPV = (C1 / (1 + r)^1) + (C2 / (1 + r)^2) + ... + (Cn / (1 + r)^n) - C0

C1, C2, C3 ... Cn = the cash flows in each of the years.

C0 = the initial cash flow 

r = the required rate of return.

These investment opportunities can be evaluated by comparing their present values.

# Opportunity 1

NPV = (C1 / (1 + r)^1) + (C2 / (1 + r)^2) + ... + (Cn / (1 + r)^n) - C0
NPV = 370.5 / (1.05)^1 + 370.5 / (1.05)^2 + 370.5 / (1.05)^3 - 950
NPV = $58.96

# Opportunity 2

NPV = (C1 / (1 + r)^1) + (C2 / (1 + r)^2) + ... + (Cn / (1 + r)^n) - C0
NPV = 427.5 / (1.05)^1 + 370.5 / (1.05)^2 + 304.0152 / (1.05)^3 -950 
NPV = $55.82

# Result
Oppurtunity 1 has a slightly higher NPV, therefore it is the better oppurtunity.