2
$\begingroup$

Why are both of these formulas returning 1? One of them should be 3.

=YEARFRAC(DATE(2015,2,27),DATE(2015,2,28),0)*360 =YEARFRAC(DATE(2015,2,28),DATE(2015,3,1),0)*360

Based on every description of 30U/360 that I can find, the first formula should return 3. But even if it were the second one, I could deal with that.

I'm using Excel 2010 14.0.7128.5000 fwiw

$\endgroup$
1
$\begingroup$

YearFrac returns the fraction of a year represented by the number of whole days between each date entered. The dates entered are one day apart in both cases.

The number of days are then divided by the assumed number of days in the year. Entering 0 gives the argument for 30/360 which is 30 days in all months and 360 days per year.

Everything before the ,0) is the numerator. The last argument in yearfrac defines the denominator, which you have set to 360 days in a year. Essentially your formula simplifies to 1/360. Multiply that by 360 and it evaluates to 1.

Both cases listed are only separated by 1 day and so the formulae are equivalent and equal to 1, not 3. To return 3 you need to increase the difference between the two dates entered. =YEARFRAC(DATE(2015,2,25),DATE(2015,2,28),0)*360

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.