** HP 17BII+ and Numworks: Payment of a Loan with an Unusual First Period**

**The First Payment Is Not Due in a Month**

In finance, the first payment of a loan is not due at the end of a month from signing. This happens when all payments are due at a certain date, such as the 30th/31st or 1st of each month, regardless of when the loan papers are signed. Loans of this type are referred to odd period loans or partial period loans. Every payment after the first follows the conventional month time line.

**HP 17BII+ Formula: Partial Period Loan **

The following HP 17BII+ formula deals with calculating odd period loans. This solver formula is directly from the HP 17BII+ Financial Calculator User's Guide, pg. 196 (see source):

**ODD: PV×(I%÷100×FP(DAYS÷30)+1)=-IF(DAYS<30:(1+I%÷100)×PMT:PMT)×UPSV(I%:N)-FV×SPPV(I%:N)**

**Numworks Script: Partial Period Loan**

**# 2021-11-14 EWS**

**# odd period**

**from math import ***

**print("Loan with partial period")**

**print("0 - 59 days")**

**print("Monthly Payments")**

**n=float(input("N: n? "))**

**rate=float(input("I/YR: rate? "))**

**pv=float(input("PV: loan amt? "))**

**fv=float(input("FV: balooon pmt? "))**

**days=float(input("DAYS: odd period? "))**

**r=rate/1200**

**if days<30:**

**j=1+r**

**else:**

**j=1**

**f=days/30-int(days/30)**

**w=r*f+1**

**# uspv**

**u=(1-(1+r)**(-n))/r**

**# sppv**

**s=(1+r)**(-n)**

**pmt=(pv*w+fv*s)/(j*u)**

**# rounding**

**pmt=-int(pmt*100+.5)/100**

**# result**

**print("Payment: "+str(pmt))**

**Note: the cash flow convention is followed**

**Examples**

**Source**

__HP 17BII+ Financial Calculator User's Guide__. Ed. 2. Hewlett Packard. San Diego, CA 2004