Calculate quarterly compound interest from yearly simple interest - excel-formula

Let's say the yearly simple interest is 10% on a principal of $100. At the end of one year, the new principal is $110. I'm trying to calculate the compound interest equivalent so by the end of the 4th quarter, the new principal should still be $110. In the example below, I'm compounding quarterly (which is incorrect) and I'm ending up with $110.38. How do I modify the formula so I end up at $110?

With your current setup:
In B5: =B2*(1+B1)^(1/4)
In B6 and drag down: =B5*(1+B$1)^(1/4).

This is technically maths rather than programming but, since Excel is a crossover, we can possibly let it through :-)
The formula for calculating initial capital plus cumulative interest on an amount of b at r% per period over n periods is:
newb = b * (1 + r/100)n
Hence, the formula for getting 10% per year with quarterly interest over that year is (using 1.1, since newb must be 10% higher than b):
1.1 = (1 + r/100)4
So, let's just give the expression 1 + r/100 the term mult for now, and we can work out the rate from that later:
mult^4 = 1.1
=> mult = ∜(1.1)
=> mult = 1.024113 (roughly)
We can then calculate that the desired interest rate is 2.4113% (by starting with mult, subtracting one, then multiplying by a hundred).
And here's the table to prove it (interest values are rouned):
Current New
Balance Interest Balance
------- -------- -------
100.00 2.41 102.41
102.41 2.47 104.88
104.88 2.53 107.41
107.41 2.59 110.00
-----
10.00
You can see that you reach the 10% increase at the end of the fourth quarter.
In Excel, assuming A1 holds the desired annual interest rate (like 10) and B1 holds the number of periods in a year (like 4), you can calculate the periodic interest rate with:
= 100 * (power (1 + a1 / 100, 1 / b1) - 1)
as per the following screenshot (which also has the four quarterly calculations):
The formulae for the tabular cells are, if you're interested:
+ A + B + C
3 | 100 | =ROUND(a3*$c$1/100,2) | =a3+b3
4 | =c3 | =ROUND(a3*$c$1/100,2) | =a4+b4
5 | =c4 | =ROUND(a3*$c$1/100,2) | =a5+b5
6 | =c5 | =ROUND(a3*$c$1/100,2) | =a6+b6
Feel free to use them as you see fit.

Related

Simple(r) Excel formula to calculate forward stock (inventory) cover

This is a perennial question for retailers, for which there are a number of solutions in existence:
How can you calculate the "forward cover" of a product knowing its current inventory and armed with forward sales estimates.
eg.
current inventory 100 units (cell A1)
weekly forward sales estimates: 25, 30, 10, 40, 90... (in range
A2:AX)
Here the answer would be 3.875 weeks (3 full weeks plus 0.875 of week 4)
I have a UDF to do this already.
I also have some slightly complicated array functions to do this, eg.
=MATCH(TRUE,SUBTOTAL(9,OFFSET(A2:A13,,,ROW(A2:A13)-ROW(A2)+1))>A1,0)-1+(A1-SUM(A2:INDEX(A2:A13,MATCH(TRUE,SUBTOTAL(9,OFFSET(A2:A13,,,ROW(A2:A13)-ROW(A2)+1))>A1,0)-1)))/INDEX(A2:A13,MATCH(TRUE,SUBTOTAL(9,OFFSET(A2:A13,,,ROW(A2:A13)-ROW(A2)+1))>A1,0)-1+1)
I was wondering if there is a neater way with these 'new-fangled' array functions which have been available for the last few years in later versions of Excel?
Here is another possible solution, although it requires the LET() function which is only available to newer version of excel (2021, 365 and later I believe).
The solution would be the following formula:
=LET(
sales,A2:A50,
inventory,A1,
cum_sum,MMULT(SEQUENCE(1,ROWS(sales),1,0),(ROW(sales)<=TRANSPOSE(ROW(sales)))*sales),
week_full,MATCH(TRUE,inventory<cum_sum,0) - 1,
week_frac,(inventory - INDEX(cum_sum,week_full)) / INDEX(sales,week_full + 1),
week_full + week_frac
)
Explanation
Given inventory and the forward looking sales estimates, the formula calculates the running total (i.e. cumulated sum) of the sales estimates as shown in the table here below
Inv and Sales
Cumulated Sum
Inv > Cum_Sum
Week
100
25
25
0
1
30
55
0
2
10
65
0
3
40
105
1
4
90
195
1
5
...
...
1
6
The formula goes on to get the number of full weeks of 'forward cover' by finding the the value for the cumulated sum that exceeds the inventory minus one (here 4 - 1 = 3).
Lastly, for the value of the week fraction covered in the last week, the formula calculates inventory minus sum of sales estimates of all previous weeks divided by sales estimate of final week of cover (i.e. (100 - 65) / 40 = 0.875).
Edit
After simplifying the formula you used with the LET() function, I noticed it's doing exactly the same calculation with the only difference of how the cumulated sum is being calculated. Here's your formula using LET():
=LET(
sales,A2:A50,
inventory,A1,
cum_sum,SUBTOTAL(9,OFFSET(sales,,,SEQUENCE(ROWS(sales)))),
week_full,MATCH(TRUE,cum_sum>inventory,0)-1,
week_frac,(inventory - INDEX(cum_sum,week_full)) / INDEX(sales,week_full+1),
week_full + week_frac
)
=LET(inv,A1,
sales,A2:A6,
cs,SCAN(0,sales,LAMBDA(x,y,x+y)),
m,XMATCH(A1,cs,1)-1,
m+(inv-
IF(m=0,
0,
INDEX(cs,m)))
/INDEX(sales,m+1))
SCAN() is perfect for creating a cumulative sum.
It can be referenced inside XMATCH because of the use of LET.
Here m returns the number of full weeks and the final calculation is the number of full weeks + (inv- cumulative sum up to the full week)/sales of the following week.

Formula to Calculate Subscriber Churn Revenue

I'm trying to sum up 12 months of subscriber revenue factoring a 6% monthly churn (assuming no signups) to come up with the one-year value of a subscriber. A simple future value gives me the start and end values, but I'm looking to get the sum of the monthly declining revenues in a single Excel / Google Sheets formula. I can make 11 entries (plus the starting month full value), but is there a better one-liner or formula for this?
This gives me the 12th-month revenue:
=FV(-6%,11,0,100)
I'd like to get the sum without this:
=100 + FV(-6%,1,0,100) + FV(-6%,2,0,100) ... FV(-6%,11,0,100)
You are looking for the sum of a finite geometric series:
1 + r + r^2 + r^3 .... + r^11
And the sum of this series is
(1 - r^12) / (1 - r)
where r = 1 - 6%
So the formula would be
= (1 - (1-6%)^12 ) / (1 - (1-6%) ) * 100
This is assuming the OP meant
=100 + FV(-6%,1,0,-100) + FV(-6%,2,0,-100) ... FV(-6%,11,0,-100)
as FV(-6%,1,0,100) would output a negative number
I don't know much about such math but would the following formula give you the result?
=100+SUMPRODUCT(FV(-6%,ROW(1:11),0,-100))
The formula works in both Excel and Google Spreadsheets

Optimising & Summarising Large Formulas

I'm working on a spreadsheet which will forecast the changes to certain costs in our building business based on estimated inputs.
For example, we may speculate that the price for a carpenter to complete a fitout will increase by $8 per m2 in Brisbane in August. We would write this data as:
Area = Brisbane
Month = August
Cost Centre = Carpenter Fitout = 150
We split each of the costs for building into different cost centres, represented numerically.
Increase = $8
Unit = m2
Based on this data, we can speculate how much each cost will increase in the coming months, and this is what I'm trying to do automatically.
The following are representations of the tables that I'm using in the spreadsheets.
Raw Data
An example of how the data looks raw from the import worksheet.
Area | Month | Centre | Value | Unit
-------|-----------|--------|-------|------
Bris | August | 150 | 10 | %
Sydney | September | 350 | 15 | m2
Import Table
How the data will be imported into the data analysing worksheet. The area, month and cost centre are combined for the VLOOKUPs later.
Label | Value | Unit
-------------------|-------|------
BrisAugust150 | 10 | %
SydneySeptember350 | 15 | m2
Calculation Table
All of the units that can be used in the import, and which calculation they correspond to. m2, m2t, m3, and EACH all use the same calculation (calc 4).
Unit | Calc | Description
-----|------|------------
FLAT | 1 | = Increase_Value
% | 2 | = Month_Value * Increase_Value / 100
000 | 3 | = Standard_Value * Increase_Value / 1000
m2 | 4 | = Standard_Value * Increase_Value
m2t | 4 |
m3 | 4 |
EACH | 4 |
Centre Values
Examples of standard quantities/dimensions that correspond to each of the cost centres.
Centre | Value
-------|-------
50 | 6
100 | 12
150 | 17
200 |
250 | ...
300 |
350 |
400 | etc
Monthly Data Dumps (For each Area)
Raw data is pasted into here from the live database at the beginning of each month to represent the costs associated with them.
July August September October
Centre
50 7 16 ... etc
100 68
150
200
250 ...
300
350
400 etc
Example Outputs
A summarised version of how the output will look, where each of the cost centres are against each of the months, and if there is something from the import that corresponds to both of these the appropriate calculation will be done.
Brisbane:
July August September October
Centre
50
100
150 10%
200
250
300
350
400
Sydney:
July August September October
Centre
50
100
150
200
250
300
350 15m2
400
Formula So Far
A psuedo-code version of the formula that will be featured in each cell so far. I thought it would be easier to decipher with labels instead of cell references, IFNA formulas taken out, etc.
=CHOOSE(
VLOOKUP( // Determine whether to use calc 1, 2, 3, or 4.
VLOOKUP( // Unit of calculation (i.e. m2, EACH, etc).
Area&Month&Centre,
Import_Table_Value,
3,
FALSE
),
Calculation_Table,
2,
FALSE
),
VLOOKUP( // Calc 1: Flat increase will only look up the increase value.
Area&Month&Centre,
Import_Value_Table,
2,
FALSE
),
( // Calc 2: % increase.
VLOOKUP( // Lookup the value from the monthly data dump corresponding to the appropriate month & cost centre.
Centre, // Cost centre (for each row).
Monthly_Data_Dump,
Appropriate_Month_Column,
FALSE
) * VLOOKUP( // Lookup the increase value.
Area&Month&Centre,
Import_Value_Table,
2,
FALSE
) / 100
),
( // Calc 3: 000' increase
VLOOKUP( // Lookup the appropriate value from the cost centre values table.
Centre,
Centre_Values,
2,
FALSE
) * VLOOKUP( // Lookup the increase value.
Area&Month&Centre,
Import_Value_Table,
2,
FALSE
) / 1000
),
( // Calc 4: Linear increase.
VLOOKUP( // Lookup the appropriate value from the cost centre values table.
Centre,
Centre_Values,
2,
FALSE
) * VLOOKUP( // Lookup the increase value.
Area&Month&Centre,
Import_Value_Table,
2,
FALSE
)
)
)
Basically, the formula will lookup a number from 1-4 and "choose" which formula will be used to determine a cell's value (if at all).
The spreadsheet has over approximately 300,000 cells to update across all the different areas, and running the formula as is takes an hour or more. I'm trying to reduce all the bloat and improve the time taken for the sheet to compute.
I've been dabbling with using INDEX MATCH instead of the VLOOKUPS, as well as trying some of the general optimisation tips that can be found online but the results only take off 5-10 minutes.
I'm after a more solid solution and am looking for advice on how to do that.
Looking at this from a data perspective you have 4 sets of information which can be represented as
RAW | CALC | DUMP | CENTRE
----------|--------|----------|-----------
Area* | Unit* | Area* | Centre*
Month* | Calc | Month* | CentreValue
Centre*| | Centre*|
Value | | Dump |
Unit | | |
RAW is your Raw Data Table, CALC is your Calculation Table, DUMP is equivalent to your Monthly Data Dumps and CENTRE is your Centre Values table.
We can conceive of these as the tables of a database with the labels in each column above representing the columns of the corresponding table. Columns with an asterisk represent the primary key(s) of the table. So, for example, table RAW has 5 columns and is keyed on the combination of columns Area, Month and Centre.
In a real database, these 4 tables could be joined to form a "view" which looks like
VIEW
--------
Area*
Centre*
Month*
Value
Dump
CentreValue
Calc
An additional column, say Result can be added to this view and (assuming I have understand your pseudo-formula correctly) assigned as
Value if Calc = 1
Value*Dump if Calc = 2
Value*CentreValue/1000 if Calc = 3
Value*CentreValue if Calc = 4
At the risk of not knowing all the subtleties of your data, in your position I would be giving consideration to implementing the above using a database approach.
3 of your inputs (RAW, CALC and CENTRE) already appear to be in the required table format whilst the fourth (DUMP) is sourced from a database so you may be able to get in the required format from its source (if not you'll just have to bash it into shape - not difficult).
The use of SQL for joining the tables into the required view replaces that complex nested set of VLOOKUP's and is likely to be considerably more efficient and faster. MS Access would be a good solution, but if not available to you you could try using MS Query. The latter is accessed via the Data Tab of the ribbon (From Other Sources/From Microsoft Query) and can access tables which are set up as named ranges in an Excel workbook. With MS Query you will need to put the input tables in a different workbook from the results view.
Both Access and Query employ a visual method for joining tables together and there will be plenty of tutorial material available on the web. Excel can import a "view" from Access (where views are known as Queries) and if using Query, closing the query pop-up window results in a prompt about whereabouts in the workbook the data should be placed.
Once you have your results in a database table format in Excel a pivot table will quickly get it to your required output format.

In Excel, how would I divide a sum, and have one cell with a different percentage

I am looking to divide a single sum among various participants.
I have 12 people listed in a column, the next column will contain the divided sum amounts. The cell at the top of the sum column (C13) will have an amount input into it ($90.63) and the formula will then divide that amount among the 12 cells under it.
people | share |
| 90.63 |
-------- | --------- |
person01 | =(C13/12) |
...
person12 | =(C13/12) |
That part I got figured out. so if column C cell 13 had an amount of $90.63 entered, the formula in the 12 cells under it would read =SUM(C13/12), each cell with this formula would then contain a divided amount to show each persons share ($7.55) of the entered amount ($90.63).
However, if one of those 12 people were to only get half of this sum amount share, how do I calculate that while giving the remaining people the extra share?
In essence, if person01 would only get =(C13/24) how do i calculate the share of the remaining 11?
people | fair share | actual share
| 90.63 |
-------- | ---------- | ------------
person01 | =(C13/12) | =(C13/24)
...
person12 | =(C13/12) | ?
Referring to my comments "For one person $C$13/24 and for rest 11 =($C$13-($C$13/24))/11 " I have rechecked and the formula proposed earlier gives correct results. Screenshot is appended below. Moreover this solution is based on Excel terminology rather than Maths.
for 1st person = c13/2 and for others =($c$13)/2/11
Place the total in C1 and then run this:
Sub cropier()
Dim V As Double, i As Long
V = Range("C1").Value
i = 2
Do Until V < 0.01
Cells(i, "C").Value = Cells(i, "C").Value + 0.01
V = V - 0.01
If V < 0.01 Then Exit Sub
For i = 3 To 13
Cells(i, "C").Value = Cells(i, "C").Value + 0.02
V = V - 0.02
If V < 0.01 Then Exit Sub
Next i
i = 2
Loop
End Sub
The macro deals out the money one or two pennies at a time until the money is completely distributed.
The person at C2 gets only half the shares of the others.
Let x be the amount that everyone (but one) pays. Let .5x be the amount that one person pays. The sum, .5x + 11x = 90.63. If you let 11.5x = 90.63, then x=7.88087. The first person pays $3.94 and the rest pay $7.88.
You can double check; 3.94 + 11 * (7.88) = 90.63.
(And yes, this is an algebra problem, not an Excel problem. Nevertheless...)
Create a column of shares that each person would have. Place a .5 in the first row and 1 in the rest. (The sum at the bottom is 11.5, in B15.)
Create a column with 90.63 at the top (here, C1). In C3, place the equation =C$1/$B$15*B3, which says to take the 90.63 and divide it by the total number of shares (11.5) and multiply by how many shares this person is assigned.
Besides them adding up to 90.63, please note that the .5 share is exactly half the amount of the rest.
(For the other answers that are dividing by 11 and such: would you please try your solution and see if you are adding up to 90.63 and whether person 1 pays 3.94?)

Formula to calculate salary after x year?

Knowing that i am getting paid $10 000 a year, and that each year my salary increase by 5%.
What is the formula for Excel to know how much i will get in 5 year?
Thank you for any advise
The formula in Excel is:
=VF(5%;5;0;-10000)
Which results in: $12,762.82
If your Office is english version you can use:
=FV(5%;5;0;-10000)
=(10000*((1 + 0.05)^5))
The Compound Interest Equation
P = C (1 + r/n)^nt
Where...
P = Future Value
C = Initial Deposit/Salary
r = Interest Rate/Pay Increase (Expressed as a Fraction: EX = 0.05)
n = Number of Times per Year the Interest/Pay Raise Is Compounded (0 in Your Example)
t = Number of Years to Calculate
The Formula is POWER(B1,C1)*10000, and the cell B1 is (1+5% ), the cell C1 is the number of years
current = 10 000
for each year -1
current = current * 1.05
end for
current now has current salary for the given number of years

Resources