
814 A.2d 642 (2003)
357 N.J.Super 132
KELLAM ASSOCIATES, INC., Plaintiff-Appellant,
v.
ANGEL PROJECTS, LLC, and Intrawest, d/a/b/ Mountain Creek, Defendants-Respondents.
Superior Court of New Jersey, Appellate Division.
Submitted December 11, 2002.
Decided January 22, 2003.
*643 Cuyler Burk, for appellant (Edgar M. Whiting, of counsel and on the brief).
Cole, Schotz, Meisel, Forman & Leonard, Hackensack, for respondent Intrawest d/b/a Mountain Creek (Edward S. Kiel, of counsel and on the brief).
Respondent Angel Projects, LLC, did not file a brief.
Before Judges KING, WECKER and LISA.
The opinion of the court was delivered by LISA, J.A.D.
Plaintiff, Kellam Associates, Inc., appeals from an order denying its motion for attorneys' fees and costs, which was based *644 upon a provision in the contract upon which this litigation was brought. The trial judge concluded Kellam is not entitled to fees and costs because the subject of the litigation is not within the purview of the contractual provision, and, further, that Kellam was not a prevailing party. We disagree and reverse.
Kellam owns a thirty-five acre tract of land which it leased to defendant Angel Products, LLC. Defendant, Intrawest Corporation, operates a recreational facility on the property and pays the rent. Intrawest is apparently a successor in interest or assignee of Angel Projects, LLC under the lease. The lease was entered into on November 1, 1997 and runs through 2035. It provides for "Initial Annual Rent" of $212,000, payable monthly, through December 31, 1998. Beginning January 1, 1999, the rent shall be adjusted each year based on a designated consumer price index (CPI) increase. The lease provides:
The Initial Annual Rent shall be increased on each January 1st, commencing January 1, 1999, by the same percentage by which the [designated CPI] shall have increased since the prior January 1st. The percentage increase in the cost of living over the prior year shall be multiplied times the Initial Annual Rent to determine the annual rent (the "Annual Rent") for the next year.
The CPI increased 2.2% from January 1, 1998 to January 1, 1999. Without dispute, the parties adjusted the rent for the year 1999 by applying the 2.2% to the $212,000, resulting in annual rent for 1999 of $216,664, which Intrawest paid. From January 1, 1999 to January 1, 2000, the CPI again increased by 2.2%. Intrawest contended the annual rent for the year 2000 would be $216,664, derived by applying the most recent CPI percentage increase to the Initial Annual Rent. It refused to pay any higher amount. Kellam contended the rent increase provision was intended to be cumulative and the most recent 2.2% CPI increase should be applied to the previous year's rent ($216,664), resulting in an annual rent for 2000 of $221,430.60.
Because Intrawest refused to pay any amount greater than $216,664 for 2000, and because of the obvious long-term ramifications of Intrawest's position on this thirty-eight year lease, Kellam sued the defendants on June 22, 2000. Its Law Division complaint was in three counts, seeking (1) a declaratory judgment that each year's rent increase would be based on the prior year's rent, (2) attorneys' fees and costs, pursuant to a lease provision and (3) damages for unpaid rent.
Intrawest moved for dismissal on the pleadings, and Kellam cross-moved for summary judgment. Based upon the motion record, the trial judge denied both motions, supported by a written opinion. The judge rejected Intrawest's position in its entirety. Although the judge accepted Kellam's rationale that annual CPI increases should be cumulative over the duration of this long-term lease, the judge's interpretation of the lease provision resulted in a different method of calculation than that advanced by Kellam. The judge concluded "that each annual percentage increase in the cost of living shall be added to the prior accumulated [percentage] increases and then multiplied times the Initial Annual Rent."
Applying this methodology, the 2000 rent is determined by cumulating the 1998 2.2% CPI increase with the 1999 2.2% CPI increase, resulting in a total 4.4% CPI increase, which is then applied to the Initial Annual Rent of $212,000, which equals $221,328. The judge's opinion directed that a similar calculation should be made each year. The figure determined for 2000 by the trial court's method is *645 $102.60 lower than that derived from Kellam's method and $4,664 higher than derived from Intrawest's method.
Although the judge issued an order denying both parties' motions, because the supporting opinion disposed of all issues except counsel fees, the parties submitted an "Order Entering Judgment," which the judge signed on May 4, 2001. It (1) declared and determined the methodology, as described above, for determining each year's rent increase, (2) entered a money judgment against Intrawest in favor of Kellam "in the amount of $4,664, representing unpaid rent increases for 2000," (3) ordered that annual rent increases for 2001 and all subsequent years be determined as set forth above, and (4) ordered that Kellam's claim for attorneys' fees and costs be determined upon a further motion by Kellam.
Kellam then filed its motion for attorneys' fees and costs, requesting a total amount of $16,692.17, including accountants' expenses and costs incurred in making the motion for fees and costs. The lease provides: "The Landlord shall be entitled to recover reasonable attorneys' fees and costs actually incurred in connection with any effort to collect past-due rent or enforce any other term of this Lease breached by Tenant."
The judge denied Kellam's motion, reasoning that this was a declaratory judgment action in which a legitimate justiciable controversy or dispute existed between the parties; the actual amount of rent due was not determined until the trial court's decision was rendered; upon issuance of the trial court's decision, and before this motion was made, Intrawest paid the amount determined to be deficient; and the rent amount determined by the court was not calculated in the manner urged by Kellam. The judge concluded:
As there was a legitimate dispute concerning... the rights and obligations of the parties under the lease, it does not appear that the action was "in connection with" past due rent or other "breach" so as to trigger contractual responsibility for legal fees. Further, as argued by defendant, imposition of legal fees pursuant to the contract is inappropriate where plaintiff did not prevail in the matter. To hold otherwise would subject the tenant to the legal fees on both sides of the case even where the landlord pursued an unsuccessful claim, contrary to the general premise of the "American Rule."
Kellam appeals only from the post-judgment order denying counsel fees and costs. Neither party has challenged the substantive provisions of the May 4, 2001 Order Entering Judgment, including the $4,664 money judgment in favor of Kellam for the past-due 2000 unpaid rent increase and the declaratory provisions determining the calculation method for the duration of the lease.
Under the so-called "American Rule," generally each party is required to pay its own attorneys' fees and other litigation costs. Rendine v. Pantzer, 141 N.J. 292, 322, 661 A.2d 1202 (1995). Certain exceptions are recognized in Rule 4:42-9(a). While a contractually-based claim, such as that asserted here, does not fall within any of the designated exceptions, the rule does not preclude a party from agreeing by contract to pay attorneys' fees. Community Realty Management, Inc. v. Harris, 155 N.J. 212, 234, 714 A.2d 282 (1998); Satellite Gateway Comm. v. Musi Dining Car Co., 110 N.J. 280, 286, 540 A.2d 1267 (1988). Because of the general policy disfavoring fee-shifting arrangements, however, contractual provisions establishing such arrangements are strictly construed. McGuire v. City of *646 Jersey City, 125 N.J. 310, 326-27, 593 A.2d 309 (1991). Applying this standard, we analyze the provision before us.
We first consider whether the subject of this litigation falls within the purview of the contractual provision authorizing attorneys' fees and costs. The complaint sought damages for past-due rent. That the complaint also sought declaratory relief does not deprive it of its overriding purpose, to compel Intrawest to pay, for the past as well as the future, additional rent due under the lease which Intrawest was refusing to pay. The declaratory judgment count sought to "enforce any other term" of the lease "breached" by Intrawest. The term was the CPI rent escalation clause; the breach was Intrawest's refusal to pay the amount provided by that term. It is plain to us that the subject of Kellam's action is covered by the lease term providing for attorneys' fees and costs.
We next consider whether Kellam was a prevailing party, because entitlement to counsel fees and costs requires such status. North Bergen Rex Transport v. TLC, 158 N.J. 561, 570, 730 A.2d 843 (1999); Singer v. State, 95 N.J. 487, 494, 472 A.2d 138, cert. denied, 469 U.S. 832, 105 S.Ct. 121, 83 L.Ed.2d 64 (1984). A two-pronged test governs this determination. First, Kellam must demonstrate that its lawsuit was causally related to securing the relief obtained. A fee award is justified if a party's efforts are a necessary and important factor in obtaining the relief. The first prong requires a factual causal nexus between the pleading and the result ultimately achieved. North Bergen Rex Transport v. TLC, supra, 158 N.J. at 570, 730 A.2d 843. The second prong requires Kellam to demonstrate that the relief it obtained had some basis in law. Id. at 571, 730 A.2d 843. This requires both a factual and legal determination. Ibid. Importantly, under the second prong
[t]he party seeking attorneys' fees need not recover all relief sought, but rather, there must be "`the settling of some dispute that affected the behavior of the [party asked to pay attorneys' fees] towards the [party seeking attorneys' fees].'" (Davidson v. Roselle Park Soccer Fed'n, 304 N.J.Super. 352, 357, 700 A.2d 900 (Ch.Div.1996)) (quoting Feriozzi Co. v. City of Atlantic City, 268 N.J.Super. 310, 314, 633 A.2d 581 (Law Div.1993)).

[Ibid.]
Kellam has satisfied both prongs of this test. Its complaint sought past-due rent; the judgment awarded past-due rent. Its complaint sought a declaration that rent be calculated and paid for the next thirty-five years based on a cumulative CPI escalation formula, resulting in amounts substantially greater than Intrawest was willing to pay; the judgment declared, determined and ordered such greater future payments. But for Kellam's lawsuit, Intrawest would not have paid the greater amounts. This satisfies the first prong.
The second prong is established because the relief Kellam sought and obtained was based on the lease, by which Intrawest was contractually obligated to pay rent, including CPI increases each year, on a timely basis. A legal basis to compel such payments therefore derived from the lease. As stated, without the lawsuit and resulting judgment, Intrawest would not have paid the additional rent it was obligated to pay under the lease.
Nevertheless, Intrawest argues that Kellam is not a prevailing party because it did not win all that it sought. The trial court agreed. We do not. For the first year in dispute, 2000, Kellam sought a CPI increase of $4,766.60. The court, applying a methodology which incorporated a cumulative increase effect, but which differed *647 from Kellam's methodology, awarded an increase of $4,664. Thus, for 2000, Kellam won 98% of what it sought.
For purposes of analysis, one might assume future CPI increases of 2.2% per year. Using that assumption, Intrawest's position would obligate it to pay a flat annual rent of $216,664 for the last thirty-seven years of this thirty-eight year lease (2.2% CPI increase applied each year to the Initial Annual Rent of $212,000). By contrast, in the second disputed year, 2001, Kellam's formulation yields an annual rent of $226,302.07,[1] and the trial court's formulation yields $225,992.[2] This means for 2001 Kellam sought $9,638.07 more than Intrawest was willing to pay ($226,302.07-$216,664), whereas the court-ordered amount is $9,328 more than Intrawest was willing to pay ($225,992-$216,664). Thus, for 2001, Kellam won 97% of what it sought.
We continue the analysis with one more illustration. In the tenth disputed year, 2009, Kellam's formulation yields annual rent of $269,336.74,[3] and the trial court's formulation yields $263,304.[4] For this year, therefore, Kellam sought $52,672.74 more than Intrawest was willing to pay ($269,336.74-$216,664), whereas the court-ordered amount is $46,640 more than Intrawest was willing to pay ($263,304-$216,664). Thus, for 2009, Kellam won 89% of what it sought.
To be sure, the differing methodologies employed by the trial court and Kellam result in a declining margin of victory each year for Kellam. In its brief, Intrawest calculates the comparative figures for the final year of the lease in support of its argument that Kellam is not a prevailing party. For 2035, assuming 2.2% annual CPI increases throughout the lease term, Kellam's formulation yields annual rent of $474,263, compared to only $384,568 under the trial court's method. Intrawest argues that Kellam received $90,000 less than it sought for 2035, and more than $1,000,000 less than it sought over the term of the lease, and thus "there is no question [Kellam] did not `prevail' in the litigation."
However, for 2035, Kellam sought $257,599 more than Intrawest was willing to pay ($474,263-$216,664), and was awarded by the trial court $167,904 more than Intrawest was willing to pay ($384, 568-$216,664). At its lowest annual victory margin, therefore, Kellam won for the final year of the lease 65% of what it sought. In the aggregate, over the term of the entire lease, Kellam sought rent increases of approximately $4,000,000 and won, by the trial court's methodology, approximately $3,000,000, or 75%.
We have no hesitancy in concluding that Kellam's claim against Intrawest was meritorious and necessary. See, e.g., North Bergen Rex Transport v. TLC, supra, 158 N.J. at 571, 730 A.2d 843 (holding that judgment for 70% of amount of past-due lease payments sought constituted "a substantial portion of its claims" and supported "prevailing party" status for TLC). Whether Intrawest's position that this was a thirty-eight year commercial lease with no rent increases after the second year raised a legitimate dispute is questionable. More significantly, the strength *648 of Intrawest's position in resisting Kellam's claim does not detract from the enforceability of Kellam's contractual right to attorneys' fees and costs. We also have no hesitancy in concluding that Kellam's victory was substantial. We hold that Kellam was a prevailing party in this litigation.
The merits of Intrawest's position is a factor to be considered in determining what is a "reasonable" fee to be assessed against it. Id. at 572, 730 A.2d 843. Likewise, "`if a successful [prevailing party] has achieved only limited relief in comparison to all of the relief sought, the [trial] court must determine whether the expenditure of counsel's time on the entire litigation was reasonable in relation to the actual relief obtained ... and, if not, reduce the award proportionately.'" Ibid. (citing Singer v. State, supra, 95 N.J. at 500, 472 A.2d 138; see also Rendine v. Pantzer, supra, 141 N.J. at 336, 661 A.2d 1202) (quoting Hensley v. Eckerhart, 461 U.S. 424, 436, 103 S.Ct. 1933, 1941, 76 L.Ed.2d 40, 52 (1983) (stating "`[i]f ... a [party] has achieved only partial or limited success, the product of hours reasonably expended on the litigation as a whole times a reasonable hourly rate may be an excessive amount. This will be true even where the plaintiff's claims were interrelated, nonfrivolous, and raised in good faith.'")).
Kellam is a prevailing party in this litigation, the subject matter of which is encompassed in the provision of its lease agreement with Intrawest authorizing attorneys' fees and costs. As such, Kellam is entitled to an award of attorneys' fees and costs. We remand the matter to the trial court for determination, in accordance with this opinion, of reasonable attorneys' fees and costs.
Reversed and remanded.
NOTES
[1]  $221,430.60 (2000 rent by Kellam's methodology) X 1.022 (one year CPI adjustment) = $226,302.07.
[2]  $212,000 (Initial Annual Rent) X 1.066 (cumulative CPI adjustment of 2.2% per year for 1998, 1999 and 2000) = $225,992.
[3]  $263,538.89 (2008 rent by Kellam's methodology) X 1.022 (one year CPI adjustment) = $269,336.74.
[4]  $212,000 (Initial Annual Rent) X 1.242 (cumulative CPI adjustment of 2.2% per year for eleven years, from 1998 through 2008 inclusive) = $263,304.
