# Write a Program to Calculate Time Value of Money and get Paid

Hello Friends

i am in great need of computer program for following scenario

I want to make 50 payment of 200\$ with interest rate of 16.50\$ and increase rate of 5% Semi annually

If not Program then at least I need a formula so I can develop program myself

Calculate the Final Amount

## Replies

• Manish Goyal
no one??

Come on Guys Please help me I have already developed the logic the only thing that I am not able to crack is this increase rate,

Please I am ready to pay even, your efforts and time will be compensated

• ManojKiran Eda
can u please explain me the question more elaborately so that i can help u...as i am good as these type of problems..
• Manish Goyal
you can google this, the only difference is increase rate on payment, i just need change for that in the actual formula for time value of money
• Kaustubh Katdare
Looks like we'll have to tag a few people: @#-Link-Snipped-# , @#-Link-Snipped-#
• Manish Goyal
I think here only a guy with great knowledge of finance related formula can help me, I can develop program myself, only I need formula for this type of calcultion

Anyone here in CE???
• ManojKiran Eda
I have ur code ready ..I am a beginner so I wrote the code in C (gcc in Linux)language....

Code#
####################################################################

#include
#include
void main(void)
{float pay_per,pay,rate,inc_rate,incr_per_months,amount,t;
int u,i;
printf("Enter the total amount to be paid :");//given pay=200\$
scanf("%f",&pay);
printf("Enter the amount that u want to pay per time :");//given u will pay 50\$
scanf("%f",&pay_per);
printf("Interest amount per time:");//interest rate=16.5\$
scanf("%f",&rate);
printf("Time after which the rate is increased (months):");// half year(6 months) rate is increased
scanf("%f",&incr_per_months);//incr_per_months=6
printf("Increse in rate in(%):");//Increased in rate=5%
scanf("%f",&inc_rate);//inc_rate=5
rate=(rate*100)/pay;//conversion of interest rate=16.5\$ interms of percentage
t=0.0;
incr_per_months=incr_per_months/12;//converting months into years
u=pay/pay_per;
for(i=0;i<=(u-1);i++)
{t=t+((pay-(i*pay_per))*pow((1+(inc_rate/100)),i));
}
amount=pay+(incr_per_months*(rate/100)*t);
printf("Total Amount is :%f\n",amount);
}

##########################################################################

I have attached the output screen...

If u have any further clarification ask me...
• simplycoder
@BigK, Thanks for tagging me.

Hi Manish,
For semi annual rate of increase, you can divide the rate by 2 and multiply the period by 2.
Hence amount=pow(P*[1+r/2], (2*n))

Share your thoughts here. It would be more helpful if you can share a complete use-case with us with input and the expected output values.

Thanks.
• Uday Bidkar
```public class TimeValueOfMoney {
public static void main(String[] args){
double futureValue = 0;
float monthlyPayment = 200, monthlyInterestRate = 16.5f/12, incrementInMonthlyInterest = 5.0f/12;
int totalPayments = 50;
int incrementIntervalInMonths = 6;
for(int i=1; i<=totalPayments;i++){
futureValue += monthlyPayment;
futureValue = futureValue + (futureValue*(monthlyInterestRate/100));
if((i % incrementIntervalInMonths) == 0){
monthlyInterestRate += incrementInMonthlyInterest;
}
}
System.out.println("Final amount = " + futureValue);
}
}```
• Uday Bidkar
@#-Link-Snipped-# , I think amount=pow(P*[1+r/2], (2*n)) won't work as it doesn't take into account the increase in interest rate after every six months. It will work only when the interest rate is constant and interest is calculated and accumulated every six months.
• Manish Goyal
OK Here is one test case

Assuming I gave someone loan (of amount ?)on date : 2/21/2014

and he started returning me payment back on 12/12/2014 in installments of 25

At nominal rate 16.50 and increase rate of 5% Semi annually.

Now I want to calculate loan amount?

For the above case it will be 1972.05

I am trying to develop web version of this software

Thanks

You are reading an archived discussion.

## GoGet Self-Driving Cars Closer To Reality - A UNSW Australia Research Project

Self-Driving cars have grabbed the world's attention with tech-giants like Google, Volkswagen, Audi and Nissan bringing their models. Last we saw, Researchers from Singapore-MIT Alliance had developed a driverless car...

## Spice Smart Flo Poise Mi-451 Launched In India At Rs. 5499

Spice has already launched several smartphones in India at an affordable price range in the past. Continuing this trend it has launched its all new Smart Flo Poise Mi-451 at...

## UK Startup Kazam Surprises All With Octa-Core Phones At MWC 2014

Big players like Samsung and Nokia aren’t the only ones surprising the world with their high-end devices. This UK startup named Kazam has announced its octa-core phones at MWC 2014....

## Samsung Introduces Octacore And Hexacore Chipsets

There is a lot of competition going on in the electronics market for the production and usage of the octacore chipsets. The Korean giant Samsung today unveiled 2 new octacore...

## Sketch Programming Language Offers 'Auto-Complete' To Your Code

Meet 'Sketch Programming Language' : developed by engineers at MIT that promises to take out the 'tough' part out of writing code; and make life better for the developers. Sketch...