With limited information so I choose to use Linear Formula
Function :
private static double Calculate(KeyValuePair<DateTime, double> startDate, KeyValuePair<DateTime, double> endDate, DateTime targetDate)
{
// It's X.
var days = (endDate.Key - startDate.Key).TotalDays;
// It's Y.
var value = (endDate.Value - startDate.Value);
// You get the value of slope here.
var slope = value / days;
// Suppose x == 0 (change linear starting point to (0,0) in other word change starting date to date 0).
var constant = startDate.Value;
var daysToFind = (targetDate - startDate.Key).TotalDays;
return (slope * daysToFind) + constant;
}
Usage :
CultureInfo culture = new CultureInfo("en-US");
var firstDate = new KeyValuePair<DateTime, double>(Convert.ToDateTime("2015/02/01", culture), 20);
var lastDate = new KeyValuePair<DateTime, double>(Convert.ToDateTime("2015/06/01", culture), 60);
var targetDate = Convert.ToDateTime("2015/05/01", culture);
var result = Calculate(firstDate, lastDate, targetDate);
With this you can predict any value in any days you want (by very uncertainty linear formula).
Like the above answer. The result value is 49.666666666666671 because the numbers of days in a month is not exactly 30.