InterestExtensions 2.0.1

dotnet add package InterestExtensions --version 2.0.1
                    
NuGet\Install-Package InterestExtensions -Version 2.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="InterestExtensions" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="InterestExtensions" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="InterestExtensions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add InterestExtensions --version 2.0.1
                    
#r "nuget: InterestExtensions, 2.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=InterestExtensions&version=2.0.1
                    
Install InterestExtensions as a Cake Addin
#tool nuget:?package=InterestExtensions&version=2.0.1
                    
Install InterestExtensions as a Cake Tool

InterestExtensions

NuGet Version NuGet Downloads Build Status codecov License Development Status

This extension facilitates the calculation of both simple interest and compound interest.


Installation

To install the package via NuGet, you can use the following command:

dotnet add package InterestExtensions

You can also visit the NuGet package page for more information and to download the package.


Features

  • Simple and compound interest calculations
  • Overloads for different compounding periods (yearly, monthly, daily)
  • XML documentation for IntelliSense and API docs
  • Thoroughly unit-tested
  • .NET 8 and above supported

💡 Usage Examples

using InterestExtension;
using InterestExtension.Enums;

decimal principal = 100m;
decimal interestRate = 0.004m;
int period = 7;

// Calculate simple interest (final amount)
decimal simple = principal.CalculateSimpleInterest(interestRate, period);

// Calculate simple interest amount (just the interest earned)
decimal simpleAmount = principal.CalculateSimpleInterestAmount(interestRate, period);

// Calculate compound interest (final amount, annual compounding)
decimal compound = principal.CalculateCompoundInterest(interestRate, period);

// Calculate compound interest (monthly compounding)
decimal compoundMonthly = principal.CalculateCompoundInterest(interestRate, period, InterestPeriod.Monthly);

// Calculate only the interest earned
decimal earned = principal.CalculateCompoundInterestAmount(interestRate, period, InterestPeriod.Daily);

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.


License

MIT License © Bruno Loures

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.1 138 5/25/2025
2.0.0 125 5/25/2025
1.0.2 274 6/6/2023
1.0.1 175 6/5/2023
1.0.0 172 6/5/2023