# Calculating interest accrued for 30/360

my typical interest calculation is Actual/Actual or Actual/365. I'm curious to how 30/360 should be calculated if the duration is not from beginning of the month to the end of the month.

For example

``````Disbursal January 15 2015
Initial Payment February 15 2015.
Principal \$10,000
Interest 8.5% Compounded semi annually
``````

Typically my calculation would be to find effective monthly rate then find the effective daily rate.

``````InterestAccrued = (((1 + 0.085/2)^2 )^ (31/365)  - 1 ) * 10000
``````

In this case I know intuitively that I can use the below to calculate interest accrued

``````InterestAccrued = (((1 + 0.085/2)^2 )^ (30/360)  - 1 ) * 10000
``````

But that's I want to programatically figure out the days passed. For example if the initial payment was February 14, 2015. What should the InterestAccrued be?

What I'm leaning towards is as follow, calculate days passed in 30/360 ratio. To February 14, 30 days has passed. So in terms of 30/30, the total days passed is below

``````DaysPassed/360 = (30/365)
DaysPassed     = 29.5890411

InterestAccrued = (((1 + 0.085/2)^2 )^ (29.5890411/360)  - 1 ) * 10000
``````
• The fringe condition are market practice and tend to vary. Of course most countries 30/360 is no longer allowed. Generally each month is treated as 30 days. So if you start in between, count till 30; that's the number of days. If you pay someone on 31, simply ignore that day. – Dheer Jan 27 '16 at 16:19
• But payments can be erratic. How do I determine if a month has passed? what is it was 29 days passed? January 1st -> january 30, I can't simply "Add a day". I can't count to 30. By the end of the year I'll reach I'll have 5 remaining days. I can't ignore those 5 days – user3276954 Jan 27 '16 at 16:26