PHPackages                             dfridrich/mortage - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dfridrich/mortage

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dfridrich/mortage
=================

Calculate mortage easily in PHP.

v1.0.1(9y ago)03291MITPHPPHP ^5.6|^7.0

Since Jul 12Pushed 9y ago1 watchersCompare

[ Source](https://github.com/dfridrich/mortage-calculator)[ Packagist](https://packagist.org/packages/dfridrich/mortage)[ Docs](https://github.com/dfridrich/mortage-calculator)[ RSS](/packages/dfridrich-mortage/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

PHP Mortage Calculator
======================

[](#php-mortage-calculator)

[![Build Status](https://camo.githubusercontent.com/da1034efa9b743610610ab29e27912710d06e1926b1d4cb2205d808bf6e4fbf0/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6466726964726963682f6d6f72746167652e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/dfridrich/mortage)[![Downloads](https://camo.githubusercontent.com/bd5cc8be1d14a87db329f86b286401a487387077d6c7f0644c0604b72a45b538/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6466726964726963682f6d6f72746167652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dfridrich/mortage)[![Latest stable](https://camo.githubusercontent.com/22868d4781db76d44816b8b3c1050dc2cefaa595bedb677e684cce2c13069f18/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6466726964726963682f6d6f72746167652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dfridrich/mortage)

I went by train one day and I wanted to make some cool library, so I did this. Now you can **calculate mortage easily in PHP.**

Install
-------

[](#install)

`composer require dfridrich/mortage`

Usage
-----

[](#usage)

```
$mortage = new Defr\MortageRequest(1000000, 1.89, 20);
/** @var \Defr\MortageResult $result */
$result = $mortage->calculate();
```

You can use `MortageResult``s getters for access values:

```
object(Defr\MortageResult)[2]
  private 'mortageRequest' =>
    object(Defr\MortageRequest)[3]
      private 'salePrice' => float 1000000
      private 'mortgageInterestPercent' => float 1.89
      private 'yearTerm' => int 20
      private 'monthTerm' => int 240
  private 'annualInterestRate' => float 0.0189
  private 'monthlyInterestRate' => float 0.001575
  private 'monthlyPayment' => float 5006.9030574862
  private 'totalPayed' => float 1201656.7337967
  private 'apr' => float 1.91
```

Credits
-------

[](#credits)

Orinally based on library from [Dave Tutfs](http://www.davetufts.com/).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~19 days

Total

2

Last Release

3574d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0fed2112d16e7f2733f3cb1f1bbfc692cae4aee38f5dd6314afc101289c869f6?d=identicon)[dfridrich](/maintainers/dfridrich)

---

Top Contributors

[![dfridrich](https://avatars.githubusercontent.com/u/3758421?v=4)](https://github.com/dfridrich "dfridrich (6 commits)")

---

Tags

phpfinancialmortage

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dfridrich-mortage/health.svg)

```
[![Health](https://phpackages.com/badges/dfridrich-mortage/health.svg)](https://phpackages.com/packages/dfridrich-mortage)
```

###  Alternatives

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
