PHPackages                             ricardokovalski/interest-calculation - 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. ricardokovalski/interest-calculation

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

ricardokovalski/interest-calculation
====================================

SDK com regras para cálculo de juros.

v1.0.2(4y ago)11172MITPHPPHP &gt;=5.6

Since May 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ricardokovalski/interest-calculation)[ Packagist](https://packagist.org/packages/ricardokovalski/interest-calculation)[ RSS](/packages/ricardokovalski-interest-calculation/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (2)

ricardokovalski/interest-calculation
====================================

[](#ricardokovalskiinterest-calculation)

 **Uma biblioteca PHP com as regras para cálculo de juros.**

 [![Source Code](https://camo.githubusercontent.com/bdab59c5c5c881904ae4114f796d1f4e676c081c6d3a45fa46df6fa71f425bc4/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d7269636172646f6b6f76616c736b692f696e7465726573742d2d63616c63756c6174696f6e2d626c75652e737667)](https://github.com/ricardokovalski/interest-calculation) [![PHP Programming Language](https://camo.githubusercontent.com/cab1c40991c77e8b5c990f35e62a75ab8e5e5c5c8feeb6b15c348403e218616b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d352e362d3737376262332e737667)](https://php.net) [![Source Code](https://camo.githubusercontent.com/4d7161c0c64d468b79e3c2798324be8b559e25f2a016cb2da65c1cb5f24d18d6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7269636172646f6b6f76616c736b692f696e7465726573742d63616c63756c6174696f6e2e737667)](https://github.com/ricardokovalski/interest-calculation/releases) [![Author](https://camo.githubusercontent.com/13ee1d4743665be497ac24068eef02fea52c9a2ad0e8855cea8805d534ff5dad/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d407269636172646f6b6f76616c736b692d626c75652e737667)](https://github.com/ricardokovalski) [![Read License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](https://github.com/ricardokovalski/interest-calculation/blob/main/LICENSE)

Sobre
-----

[](#sobre)

ricardokovalski/interest-calculation é uma biblioteca PHP que contém as regras para cálculo de juros Simples, Compostos e Financiamento.

Instalação
----------

[](#instalação)

Instale este pacote como uma dependência usando [Composer](https://getcomposer.org).

```
composer require ricardokovalski/interest-calculation
```

Uso básico
----------

[](#uso-básico)

### Juros de Financiamento

[](#juros-de-financiamento)

```
use RicardoKovalski\InterestCalculation\Types\Financial;

$interest = new Financial(0.98);

// Adiciona um valor ao TotalCapital
$interest->appendTotalCapital(227.49);

// Adiciona um valor ao InterestValue
$interest->appendInterestValue(1.55);

// Reseta o valor de TotalCapital para 0.00
$interest->resetTotalCapital();

// Reseta o valor de TotalCapital para 200.00
$interest->resetTotalCapital(200.00);

// Reseta o valor de InterestValue para 0.00
$interest->resetInterestValue();

// Reseta o valor de InterestValue para 2.75
$interest->resetInterestValue(2.75);

// Obter o valor de TotalCapital
$interest->getTotalCapital();

// Obter o valor de InterestValue
$interest->getInterestValue();

// Obter o valor de InterestRates
$interest->getInterestRates();

// Verifica se o valor de InterestValue está zerado
$interest->interestValueIsZeroed();

// Obter valor do juros da 2ª parcela
$interest->getValueCalculatedByInstallment(2);

// Obter valor do juros reverso da 12ª parcela
$interest->getReverseInterestByNumberInstallments(12);
```

### Outros tipos de Juros

[](#outros-tipos-de-juros)

Para juros compostos, utilize a classe Compound.

```
use RicardoKovalski\InterestCalculation\Types\Compound;

$interest = new Compound(3.69);
```

Para juros simples, utilize a classe Simple.

```
use RicardoKovalski\InterestCalculation\Types\Simple;

$interest = new Simple(2.99);
```

Copyright and License
---------------------

[](#copyright-and-license)

The ricardokovalski/interest-calculation library is copyright © [Ricardo Kovalski](https://github.com/ricardokovalski)and licensed for use under the terms of the MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

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 ~18 days

Total

4

Last Release

1817d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b6f26053587d0d30779f0864360da904b5227317480dc2ee00773ca8d1b7e280?d=identicon)[ricardokovalski](/maintainers/ricardokovalski)

---

Top Contributors

[![ricardokovalski](https://avatars.githubusercontent.com/u/13839909?v=4)](https://github.com/ricardokovalski "ricardokovalski (29 commits)")

---

Tags

calculationcalculatorinterestinterest-calculationinterest-ratescalculationcalculatorinterestinterest-ratesinterest-calculation

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/ricardokovalski-interest-calculation/health.svg)

```
[![Health](https://phpackages.com/badges/ricardokovalski-interest-calculation/health.svg)](https://phpackages.com/packages/ricardokovalski-interest-calculation)
```

###  Alternatives

[mjaschen/phpgeo

Simple Yet Powerful Geo Library

1.6k9.1M27](/packages/mjaschen-phpgeo)[markrogoyski/ipv4-subnet-calculator

Network calculator for subnet mask and other classless (CIDR) network information.

175839.3k13](/packages/markrogoyski-ipv4-subnet-calculator)[ballen/distical

A distance (Lat/Long) calculation library for PHP

40194.3k2](/packages/ballen-distical)

PHPackages © 2026

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