calculate({
    make,
    msrp,
    sellingPrice,
    rv,
    isRVPercent = true,
    mf,
    leaseTerm = 36,
    salesTax = 0,
    totalFees = 0,
    rebates = 0,
    tradeIn = 0,
    downPayment = 0,
    taxMethod = TAX_ON_MONTHLY_PAYMENT,
  }) {
    this.make = make;
    this.msrp = msrp;
    this.sellingPrice = sellingPrice;
    this.rv = rv;
    this.isRVPercent = isRVPercent;
    this.mf = mf;
    this.leaseTerm = leaseTerm;
    this.salesTax = salesTax;
    this.totalFees = totalFees;
    this.rebates = rebates;
    this.tradeIn = tradeIn;
    this.downPayment = downPayment;
    this.taxMethod = taxMethod;

    this._validateData();

    this._calculateRV();
    const grossCapCost = this.sellingPrice + this.totalFees;
    const capCostReduction = this.downPayment + this.rebates + this.tradeIn;
    // Net Cap Cost. By default, acquisition fee is capitalized
    const adjustedCapCost =
      grossCapCost - capCostReduction + this.getAcquisitionFee();
    const depreciation = adjustedCapCost - this.RVValue;
    const basePayment = depreciation / this.leaseTerm;
    const rentCharge = (adjustedCapCost + this.RVValue) * this.mf;
    this.apr = this._MFToAPR();
    this.monthlyPaymentPreTax = basePayment + rentCharge;
    this.monthlyPayment = this.calculateMonthlyPaymentWithTax();
    this.driveOffPayment = this.getDriveOffPayment();
  }
/*
    Calculates the lease' monthly payment, APR, total cost, etc.

    make          Make of the vehicle, for calculating fees
    msrp          Required, MSRP of the vehicle
    sellingPrice  Required, negotiated price of the vehicle
    rv            Required, Residual value of the vehicle
    isRVPercent   Whether the rv is absolute value of a percentage of MSRP
    mf            Required, The money factor of the lease
    leaseTerm     The length of the lease in months.
    salesTax      The state's sales tax in percentage.
    totalFees     Total fees of the lease
    rebates       Total discount from dealer and manufacturer
    tradeIn       Total trade-in value
    downPayment   Down payment, if applicable
    taxMethod     Method of taxation to apply, based on state
  */
Calculates the lease' monthly payment, APR, total cost, etc.
make          Make of the vehicle, for calculating fees
msrp          Required, MSRP of the vehicle
sellingPrice  Required, negotiated price of the vehicle
rv            Required, Residual value of the vehicle
isRVPercent   Whether the rv is absolute value of a percentage of MSRP
mf            Required, The money factor of the lease
leaseTerm     The length of the lease in months.
salesTax      The state's sales tax in percentage.
totalFees     Total fees of the lease
rebates       Total discount from dealer and manufacturer
tradeIn       Total trade-in value
downPayment   Down payment, if applicable
taxMethod     Method of taxation to apply, based on state
Calculates the lease ' monthly payment APR total cost etc . make Make of the vehicle for calculating fees msrp Required MSRP of the vehicle sellingPrice Required negotiated price of the vehicle rv Required Residual value of the vehicle isRVPercent Whether the rv is absolute value of a percentage of MSRP mf Required The money factor of the lease leaseTerm The length of the lease in months . salesTax The state ' s sales tax in percentage . totalFees Total fees of the lease rebates Total discount from dealer and manufacturer tradeIn Total trade - in value downPayment Down payment if applicable taxMethod Method of taxation to apply based on state
calculate({
    make,
    msrp,
    sellingPrice,
    rv,
    isRVPercent = true,
    mf,
    leaseTerm = 36,
    salesTax = 0,
    totalFees = 0,
    rebates = 0,
    tradeIn = 0,
    downPayment = 0,
    taxMethod = TAX_ON_MONTHLY_PAYMENT,
  }) {
    this.make = make;
    this.msrp = msrp;
    this.sellingPrice = sellingPrice;
    this.rv = rv;
    this.isRVPercent = isRVPercent;
    this.mf = mf;
    this.leaseTerm = leaseTerm;
    this.salesTax = salesTax;
    this.totalFees = totalFees;
    this.rebates = rebates;
    this.tradeIn = tradeIn;
    this.downPayment = downPayment;
    this.taxMethod = taxMethod;
    this._validateData();
    this._calculateRV();
    const grossCapCost = this.sellingPrice + this.totalFees;
    const capCostReduction = this.downPayment + this.rebates + this.tradeIn;
    const adjustedCapCost =
      grossCapCost - capCostReduction + this.getAcquisitionFee();
    const depreciation = adjustedCapCost - this.RVValue;
    const basePayment = depreciation / this.leaseTerm;
    const rentCharge = (adjustedCapCost + this.RVValue) * this.mf;
    this.apr = this._MFToAPR();
    this.monthlyPaymentPreTax = basePayment + rentCharge;
    this.monthlyPayment = this.calculateMonthlyPaymentWithTax();
    this.driveOffPayment = this.getDriveOffPayment();
  }
calculate ( { make , msrp , sellingPrice , rv , isRVPercent = true , mf , leaseTerm = 36 , salesTax = 0 , totalFees = 0 , rebates = 0 , tradeIn = 0 , downPayment = 0 , taxMethod = TAX_ON_MONTHLY_PAYMENT , } ) { this . make = make ; this . msrp = msrp ; this . sellingPrice = sellingPrice ; this . rv = rv ; this . isRVPercent = isRVPercent ; this . mf = mf ; this . leaseTerm = leaseTerm ; this . salesTax = salesTax ; this . totalFees = totalFees ; this . rebates = rebates ; this . tradeIn = tradeIn ; this . downPayment = downPayment ; this . taxMethod = taxMethod ; this . _validateData ( ) ; this . _calculateRV ( ) ; const grossCapCost = this . sellingPrice + this . totalFees ; const capCostReduction = this . downPayment + this . rebates + this . tradeIn ; const adjustedCapCost = grossCapCost - capCostReduction + this . getAcquisitionFee ( ) ; const depreciation = adjustedCapCost - this . RVValue ; const basePayment = depreciation / this . leaseTerm ; const rentCharge = ( adjustedCapCost + this . RVValue ) * this . mf ; this . apr = this . _MFToAPR ( ) ; this . monthlyPaymentPreTax = basePayment + rentCharge ; this . monthlyPayment = this . calculateMonthlyPaymentWithTax ( ) ; this . driveOffPayment = this . getDriveOffPayment ( ) ; }
Calculates the lease' monthly payment, APR, total cost, etc.
Calculates the lease ' monthly payment APR total cost etc .
// Net Cap Cost. By default, acquisition fee is capitalized