Calaulate interest on debt until paid

Posted on 2012-08-29
Last Modified: 2012-08-30
Not sure how to ask this question. I am using Adobe Acrobat X to present a form to a dealer that is used to report monthly meals tax remittance. The dealer is required to collect a local percentage of the net cost of the meal in addition to state sales tax. Each month, the amount collected must be reported and the amount collected must be remitted to the locality. I have the form created that does that. In addition, if the amount they owe (based on the calculation against gross sales * the % of local meals tax) is not remitted they pay a penalty of 10% or $10, whichever is more. I have worked out that calculation as well.

Where I am stumped is calculating the interest on the amount due if it is not reported and paid within 30 days of the due date. As an example:

Gross Sales = $1,000
Local % = 6%
Penalty = The greater of 10% or $10
Due Date = July 20, 2012
Filing Date = August 21, 2012
Gross Sales * Local % = Tax Due ($60)
PenaltyAmt = $10
Total Due = Tax Due ($60) + Penalty ($10)
Interest = 10% (.8333% per month) per year on the unpaid balance after 30 days.


If not paid by the 20th of the month following the last day of the month being reported(January 1-31 Gross is reportable by February 20), the penalty is the greater of 10% or $10. In this scenario the dealer is late filing by 60 days therefore subject to the penalty. The interest will not be applied until the 31st day of delinquency.

The answer I am looking for in the scenario above is:

Tax Due + Penalty = $70
Interest = $.58
Total Due = Tax Due + Penalty + Interest ($70.58)

On August 21, the amount due will be:

Tax Due + Penalty = $70
Interest = $1.17 ($70 * .016666)
Total Due = $71.17

Now JavaScript can I attach to the Toal Due field in an Acrobat for to calculate the Interest and populate the Total Due.

Wow. That was tough!!
Question by:ergenbgr
    LVL 25

    Expert Comment

    by:Kyle Hamilton
    its not clear what you are asking for.

    are you looking for the formula to calculate annual interest with a javascript implementation,

    or how to connect javascript to acrobat?

    Author Comment

    How to calculate annual interest with javascript. My concern is that the interest is applied to the TotalDue (TaxDue + Penalty) each month.  There is no interest on interest as the TotalDue increases. Every 30 days, interest is applied to the original principle, not the balance due.

    Make sense?
    LVL 25

    Expert Comment

    by:Kyle Hamilton
    Do you want to apply interest on interest? In other words, compound monthly - that would be a typical scenario. ( you can also compound quarterly, semi-annually, annually, etc...)

    Or, do you Not want to compound the interest?

    Author Comment

    Will not compound interest. This project is for a local government meals tax administration. That being the case, the interest is applied each month only to the initial assessment. First 30 day period would be TotalDue * .0083, second 30 day period would be TotalDue * .016667, third 30 day would be TotalDue * .024999.

    LVL 25

    Expert Comment

    by:Kyle Hamilton
    If someone wants to pay off their debt in the middle of the month, is the interest pro-rated (in which you would calculate daily interest, not monthly), or do they pay the full month's interest?

    Author Comment

    I just checked with collections and was told that the interest is calculated daily after the first day of delinquency. That being the case, DailyRateOfInterest (AnnualTaxRate / 365) = .000274.
    LVL 25

    Accepted Solution

    multiply .000274 by the munber of days interest is due:

     var _rate = .00027397260274; // constant
        var taxDue = 60; // the $60 dolloars from your example
        var penalty = 10; // the $10 from your example
        var principal = taxDue + penalty;
        var interestDue = 0;
        var daysOwing = 60; // the number of days that interest is charged
        function calculateTotalDue(){
            interestDue = principal * _rate * daysOwing;
            // add to the principal
            totalDue = principal + interestDue;
            // UP to two decimal places
            totalDue = Math.ceil((totalDue * 100));
            totalDue /= 100;
            return totalDue;

    Open in new window

    Do you need help figuring the days owing or other date functions?

    Author Closing Comment

    Valuable assistance, thanks.

    Featured Post

    Course: HTML5 for Beginning Beginners

    Are you looking for an efficient introduction to HTML5? Have you tried other HTML5 courses and found them too complex? Do you need just the basics of HTML5 to use with Wordpress or other content management system? If you said yes to any of these questions, this course is for you.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Input sanitization for text field 3 26
    json format text only 4 50
    PHP Radio Array 4 27
    CRM 2011 Error when closing 17 30
    The ability to edit PDF documents can be useful, however it may not be a straight forward process. Many non-technical people don't realise that a PDF document is basically an image rather than a text file, even if it contains nothing but text. If…
    *Adobe Acrobat 9 was used for this article. Particular steps may vary depending on software versions. 1. Create a framework of your form in Word, leaving space where you’d ultimately like the Adobe fields to appear.  (Note: I use the blank lines …
    In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now