RATE function for non annuity cash flows

Answer_the_question

New Member
Joined
Nov 19, 2015
Messages
17
Thank you in advance for your time/help!

I have a series of cash flows that take place over the next 40 years (in different amounts and not an annuity) for which I am trying to determine what discount rates will output specific NPVs ($150, $200, $250, and $300). Currently I just run a bunch of goal seeks to determine what interest rates apply, but this method is a bit of a pain and prone to human error. I know the RATE function does something similar to what I'd like but it only applies to annuities and does not apply in my case.

Is there another function or a data table method to achieve what i am looking for?

Thanks!
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
My appologies. I explained the above incorrectly. I am not varrying the discount rate, I am actually varying the the royalty rate that applies to the top line revenues and using a constant discount rate (so i am changing the cashflows, and trying to determine by what % they need to be changed so that the NPV arrives at specific values)

Sorry for the confusion
 
Upvote 0
Are the cash flows at constant intervals?

You want to find a single multiplier for all numbers that results in a given NPV?
 
Upvote 0
I have a series of cash flows that take place over the next 40 years (in different amounts and not an annuity) for which I am trying to determine what discount rates will output specific NPVs ($150, $200, $250, and $300). Currently I just run a bunch of goal seeks to determine what interest rates apply, but this method is a bit of a pain and prone to human error. I know the RATE function does something similar to what I'd like but it only applies to annuities and does not apply in my case. Is there another function or a data table method to achieve what i am looking for?

If the varying cashflows occur at regular intervals (monthly, quarterly, annually, etc), use the Excel IRR function. But note that Excel IRR returns a period rate; for example, if you cash flows are monthly, Excel IRR returns a monthly rate. You can annualize using the formula =(1+IRR(...))^f - 1, where "f" is the frequency per year (12 for monthly, 4 for quarterly, etc).

If the varying cashflows occur at irregular intervals, use the Excel XIRR function. Note that you need to specify the dates as well as the corresponding cashflows. Also note that Excel XIRR always returns an annual rate.

Remember that cashflows must be signed properly; for example, negative for outflows (savings), and positive for inflows (distributions). You must have at least one negative and one positive cash flow. I would suggest that you use -requiredNPV and +royalty.

Caveat: Excel XIRR is notorious for returning Excel errors (#NUM or #DIV/0) and incorrect rates for "unusual" cashflows. I don't believe you will encounter the problem in your situation. Nevertheless, it would behoove you to double-check the result. Ostensibly, use Excel XNPV; however, Excel XNPV does not work with negative discount rates. Use the following paradigm instead:

=SUMPRODUCT(C1:C40/(1+R1)^D1:D40)

where C1:C40 are the cashflows, D1:D40 are the corresponding dates, and R1 is the result from Excel XIRR.

Occassionally, Excel IRR also returns Excel errors for "unusual" cashflows. I have not seen or heard of it returning incorrect rates. Nevertheless, it would not hurt to use Excel NPV to double-check the result.
 
Last edited:
Upvote 0
The cash flows occur at the mid point of each year, expect for the first payment which takes place half way between today and the end of 2016.

The IRR suggestion above is an exceellent solution for my original question, but in my updated scenario (my bad for posting the wrong thing originally), I am varrying the actual cash flows instead of the interest rates.

To illustrate what I am trying to do here is a quick simplified version of what I am trying to accomplish (sorry this doesnt paste nicer)


18-Jan-1630-Jun-1630-Jun-1730-Jun-1830-Jun-1930-Jun-2030-Jun-2130-Jun-2230-Jun-2330-Jun-2430-Jun-2530-Jun-2630-Jun-2730-Jun-28
Revenue- $4,756 $3,910 $2,156 $4,672 $1,389 $1,362 $2,164 $1,278 $4,540 $3,413 $3,205 $2,996 $3,577
Royalty1.57%- $75 $61 $34 $73 $22 $21 $34 $20 $71 $54 $50 $47 $56
NPV8% $400
Desired NPVs $400 $450 $500 $550 $600 $650
Require interest rate (from goal seek) 1.57%Need to fill these in automatically

<tbody>
</tbody>

Same as above but with formulas:

=TODAY()42551=EDATE(D3,12)=EDATE(E3,12)=EDATE(F3,12)=EDATE(G3,12)=EDATE(H3,12)=EDATE(I3,12)=EDATE(J3,12)=EDATE(K3,12)=EDATE(L3,12)=EDATE(M3,12)=EDATE(N3,12)=EDATE(O3,12)
Revenue04756391021564672138913622164127845403413320529963577
Royalty0.0157225426448098=C4*$B$5=D4*$B$5=E4*$B$5=F4*$B$5=G4*$B$5=H4*$B$5=I4*$B$5=J4*$B$5=K4*$B$5=L4*$B$5=M4*$B$5=N4*$B$5=O4*$B$5=P4*$B$5
NPV0.08=XNPV(B7,$C$5:$P$5,$C$3:$P$3)
Desired NPVs400450500550600650
Require interest rate (from goal seek)0.0157225426448098Need to fill these in automatically

<tbody>
</tbody>
 
Upvote 0
One solution I have come up with (only a slight improvement) is that I can output a data table that varies the input royalty % (starts at 1% and increase by 0.01% up to 3.00%), and then combine that with a MROUND function so that I can vlookup up from the data table and return the answer. The real issue here is that this is not clean (or accurate), increases the file size and calculation time, and will be difficult for other people to understand/audit

Any more thoughts?
 
Upvote 0
Response Part #1

I am responding in multiple parts to avoid posting limits.

The IRR suggestion above is an exceellent solution for my original question, but in my updated scenario (my bad for posting the wrong thing originally), I am varrying the actual cash flows instead of the interest rates.

Yes, I read that earlier, but the distinction did not sink in. My bad!

To illustrate what I am trying to do here is a quick simplified version of what I am trying to accomplish (sorry this doesnt paste nicer)

For future reference, it would be better to (additionally?) upload the Excel file to a file-sharing website and post the public/share URL in a posting here, in order to save us the trouble of duplicating all the data and formulas.

Even though this does not reflect what you are trying to do (vary the royalty rate/stream, not the IRR), the following demonstrates how to use Excel XIRR to calculate the IRR for the various required NPVs in H7:M7.

It might be instructive, since your spreadsheet design presents an implementation challenge. The Excel XIRR requires each parameter to be a 1-dimensional array or contiguous range.

You can also download "rev stream.xls" (click here) [1]. See the "post#5" worksheet.

[1] https://app.box.com/s/0efidwzemhln4h8a20t22j4l2s243gqd


A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
2
CF#

012345678910111213
3
Date

1/18/20166/30/20166/30/20176/30/20186/30/20196/30/20206/30/20216/30/20226/30/20236/30/20246/30/20256/30/20266/30/20276/30/2028
4
Sales rev


4,7563,9102,1564,6721,3891,3622,1641,2784,5403,4133,2052,9963,577
5
Royalty
1.57%075613473222134207154504756
6
















7
NPV rate
8.00%400


Reqd NPV400450500550600650


8


NPV


NPV rate8.00%5.60%3.63%1.96%0.52%-0.74%


9






NPV check0.00000.00000.00000.00000.00000.0000


10












#NUM!XNPV bug


<tbody>
</tbody>
Rich (BB code):
Formulas:
C2:P4 are the constants as displayed
C3:  =TODAY()
D3:  =DATE(YEAR(C3)+(C3>=DATE(YEAR(C3),6,30)),6,30)
E3:  =EDATE(D3,12)
     Copy E3 into F3:P3
D4:P4 are the constants as displayed
B5:  1.57225426448098%
C5:  =C4*$B$5
     Copy C5 into D5:P5
B7:  8%
C7:  =XNPV(B7,$C$5:$P$5,$C$3:$P$3)
H7:M7 are the constants as displayed
H8:  {=XIRR(IF(COLUMN($C$3:$P$3)=COLUMN($C$3),-H7,$C$5:$P$5),$C$3:$P$3)}
     Copy H8 into I8:M8
H9:  {=SUM(IF(COLUMN($C$3:$P$3)=COLUMN($C$3),-H7,$C$5:$P$5)/(1+H8)^(($C$3:$P$3-$C$3)/365))}
     Copy H9 into I9:M9
M10: {=XNPV(M8,IF(COLUMN($C$3:$P$3)=COLUMN($C$3),-M7,$C$5:$P$5),$C$3:$P$3)}
Formulas displayed with curly brackets {...} are array-entered, to wit: type the formulas without the curly brackets, then press ctrl+shift+Enter instead of just Enter. Excel displays the curly brackets in the Formula Bar to indicate that the formula is array-entered.

The formula in D3 yields the next closest June 30. I presume that is your intent.

The formula in H8 demonstrates one way to construct a 1-dimensional array from a non-contiguous range of cells.

The formula in H9 demonstrates how to work around the Excel XNPV defect, demonstrated by the formula in M10. Excel XNPV does not allow a negative discount, for no good reason. The array-entered SUM formula in H9 demonstrates that the NPV is computable.

The basis for the formula in H9 is the mathematical definition of Excel XNPV shown in the Excel XNPV help page.
 
Upvote 0
Response Part #2

I am responding in multiple parts to avoid posting limits.

I am not varrying the discount rate, I am actually varying the the royalty rate that applies to the top line revenues and using a constant discount rate

So you need to specify the discount rate to use. I assume that is in B7.

One solution I have come up with (only a slight improvement) is that I can output a data table that varies the input royalty % (starts at 1% and increase by 0.01% up to 3.00%), and then combine that with a MROUND function so that I can vlookup up from the data table and return the answer. [....] Any more thoughts?

I am not quite sure what you have in mind. I cannot comment without details. Please upload an Excel file that demonstrates this solution to a file-sharing website and post the public/share URL in a (new) response here.

My guess(es)....

In the real world, it makes sense for the royalty rate to depend on the sales revenue. (Or the number of units sold.)

For example, the royalty rate might be the base rate plus 0.01% for every $35 over $1200 up to $8200 (a max of 3%). That seems to be what you describe.

Ostensibly, the formula is: baseRate + MAX(0, MIN(2%, 0.01%*ROUNDUP((D4-1200)/35,0))), where D4 is sales revenue.

More generally, we might use LOOKUP to create more arbitrary royalty tiers, for example:
baseRate + LOOKUP(D4,{0,1200,1400,1800,2600,4200,7400,13800},{0,0.0001,0.001,0.0025,0.005,0.0075,0.01,0.02})

Alternatively, we might put the corresponding values into R1:R8 and S1:S8, for example, and use: baseRate + LOOKUP(D4, $R$1:$R$8, $S$1:$S$8).

-----

The mathematical formula for the NPV on date "d0" and given discount rate "r" could be written as follows:

NPV = Sigma(C/(1+r)^((d-d0)/365), i=1,...,n)

Note some "labeling" differences with the Excel XNPV help page.

In your case, C = sales * (baseRate + x), where "x" is one of the incremental formulas above.

So, using the LOOKUP formula above, we can solve for baseRate as follows:
Rich (BB code):
NPV = Sigma(sales * (baseRate + LOOKUP(sales,R1:R8,S1:S8)) / (1+r)^((d-d0)/365), i=1,...,n)

    = baseRate * Sigma(sales / (1+r)^((d-d0)/365), i=1,...,n)
      + Sigma(sales * LOOKUP(sales,R1:R8,S1:S8) / (1+r)^((d-d0)/365), i=1,...,n)

baseRate = (NPV - Sigma(sales * LOOKUP(sales,R1:R8,S1:S8) / (1+r)^((d-d0)/365), i=1,...,n))
           / Sigma(sales / (1+r)^((d-d0)/365), i=1,...,n)


The following demonstrates how we might implement this in Excel.

You can also download "rev stream.xls" (click here) [1]. See the "LOOKUP" and "ROUNDUP" worksheets.

[1] https://app.box.com/s/0efidwzemhln4h8a20t22j4l2s243gqd

LOOKUP method....


A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
2
CF#

012345678910111213
Sales+Royalty
3
Date
1/19/20166/30/20166/30/20176/30/20186/30/20196/30/20206/30/20216/30/20226/30/20236/30/20246/30/20256/30/20266/30/20276/30/2028
00.00%
4
Sales rev

4,7563,9102,1564,6721,3891,3622,1641,2784,5403,4133,2052,9963,577
1,2000.01%
5

















1,4000.10%
6

















1,8000.25%
7
NPV rate8.00%














2,6000.50%
8
Reqd NPV400450500550600650









4,2000.75%
9
Base royalty1.0489%1.2454%1.4419%1.6384%1.8349%2.0313%









7,4001.00%
10

















13,8002.00%
11
Royalty rate

1.7989%1.5489%1.2989%1.7989%1.0589%1.0589%1.2989%1.0589%1.7989%1.5489%1.5489%1.5489%1.5489%


12
Royalty rev

86612884151428148253504655


13
NPV

400















<tbody>
</tbody>
Rich (BB code):
Formulas:
B9:  {=(B8 - SUM($D$4:$P$4 * LOOKUP($D$4:$P$4,$R$3:$R$10,$S$3:$S$10) / (1+$B$7)^(($D$3:$P$3-$C$3)/365)))
      / SUM($D$4:$P$4 / (1+$B$7)^(($D$3:$P$3-$C$3)/365))}
     Copy B9 into C9:G9
D11: =$B$9 + LOOKUP(D4,$R$3:$R$10,$S$3:$S$10)
     Copy D11 into E11:P11
D12: =D4*D11
     Copy D12 into E12:P12
D13: {=SUM(IF(COLUMN($C$3:$P$3)=$C$3,-B8,C12:P12) / (1+$B$7)^(($C$3:$P$3-$C$3)/365))}

Formulas displayed with curly brackets {...} are array-entered, to wit: type the formulas without the curly brackets, then press ctrl+shift+Enter instead of just Enter. Excel displays the curly brackets in the Formula Bar to indicate that the formula is array-entered.

The derivation of the base royalties for various required NPVs is in rows 8 and 9.

Rows 11 through 12 demonstrate the correctness of the base royalty in B9 for the required NPV in B8, for example.

We could use XNPV instead of SUM in D13, since the discount rate (B7) is positive, in this case.

ROUNDUP method:


A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
2
CF#

012345678910111213
3
Date

1/19/20166/30/20166/30/20176/30/20186/30/20196/30/20206/30/20216/30/20226/30/20236/30/20246/30/20256/30/20266/30/20276/30/2028
4
Sales rev

4,7563,9102,1564,6721,3891,3622,1641,2784,5403,4133,2052,9963,577
5
















6
















7
NPV rate8.00%













8
Reqd NPV400450500550600650








9
Base royalty0.8751%1.0715%1.2680%1.4645%1.6610%1.8575%








10
















11
Royalty rate


1.8951%1.6551%1.1551%1.8751%0.9351%0.9251%1.1551%0.9051%1.8351%1.5151%1.4551%1.3951%1.5551%
12
Royalty rev


90652588131325128352474256
13
NPV


400












<tbody>
</tbody>
Rich (BB code):
Formulas:
B9:  {=(B8 - SUM($D$4:$P$4 * IF($D$4:$P$4<1200, 0, IF($D$4:$P$4>8200, 2%, 0.01%*ROUNDUP(($D$4:$P$4-1200)/35,0))) / (1+$B$7)^(($D$3:$P$3-$C$3)/365)))
      / SUM($D$4:$P$4 / (1+$B$7)^(($D$3:$P$3-$C$3)/365))}
     Copy B9 into C9:G9
D11: =$B$9 + MAX(0, MIN(2%, 0.01%*ROUNDUP((D4-1200)/35,0)))
     Copy D11 into E11:P11
D12: =D4*D11
     Copy D12 into E12:P12
D13: {=SUM(IF(COLUMN($C$3:$P$3)=$C$3,-B8,C12:P12) / (1+$B$7)^(($C$3:$P$3-$C$3)/365))}

Note that we cannot use MAX and MIN in the array-entered formula in B9.

Alternatively, we could ensure that the sales revenue in row 4 is between 1200 and 8200. That obviate the need for the IF(...,0,IF(...,2%,...)) construct.

Any questions? :LOL:
 
Upvote 0
Wow this is quite the response! Thank you

I am going to take a second to digest all this, but in the mean time what sharing site would you recommend (normally I'd use google drive but that is blocked at my work)?
 
Upvote 0
I am going to take a second to digest all this, but in the mean time what sharing site would you recommend (normally I'd use google drive but that is blocked at my work)?

Just "a second"? ;) Yeah, it got a little overwhelming. Sorry about that. Some free file-sharing websites:

Dropbox: http://dropbox.com
Box.Net: http://www.box.net/files

I had others on the list, but someone reported issues with at least one. Since I don't remember which one, I've pared down the list to the two that I use.

Some minor clarifications, which might or might not help your understanding....

For example, the royalty rate might be the base rate plus 0.01% for every $35 over $1200 up to $8200 (a max of 3%). That seems to be what you describe. Ostensibly, the formula is: baseRate + MAX(0, MIN(2%, 0.01%*ROUNDUP((D4-1200)/35,0))), where D4 is sales revenue.

I would suggest ignoring this method, since the Excel implementation is unduly complicated.

I was just trying to make sense of the royalty rate schedule that you suggested [1]. But on second thought, if you are content to use a table lookup, that would work for this rate schedule, as well. The table just contains 201(!) "tiers".

[1] You wrote: "I can output a data table that varies the input royalty % (starts at 1% and increase by 0.01% up to 3.00%), and then combine that with a MROUND function so that I can vlookup up from the data table".

In your case, C = sales * (baseRate + x), where "x" is one of the incremental formulas above. So [...] we can solve for baseRate as follows:


I got ahead of myself. I intended the following for the abstract derivation.
Rich (BB code):
NPV = Sigma(sales * (baseRate + x) / (1+r)^((d-d0)/365), i=1,...,n)

    = baseRate * Sigma(sales / (1+r)^((d-d0)/365), i=1,...,n)
      + Sigma(sales * x / (1+r)^((d-d0)/365), i=1,...,n)

baseRate = (NPV - Sigma(sales * x / (1+r)^((d-d0)/365), i=1,...,n))
           / Sigma(sales / (1+r)^((d-d0)/365), i=1,...,n)
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top