Home
Softono
Financial-Formulas

Financial-Formulas

Open source MIT C#
34
Stars
6
Forks
0
Issues
4
Watchers
7 years
Last Commit

About Financial-Formulas

Financial-Formulas is a comprehensive cross-platform library providing methods to solve essential finance and accounting equations. Originally developed with implementations in Java, C, C++, and Python, the project offers versatile solutions for developers working in multiple programming environments. While C support has been migrated to a dedicated .NET Core repository for future development, the core functionality remains accessible across the supported languages. The library covers a wide spectrum of financial metrics and calculations, including profitability ratios like Gross Profit Margin and Return on Equity, liquidity measures such as Current and Quick Ratios, and efficiency indicators like Inventory Turnover and Asset Turnover. It also includes depreciation models (Straight Line and Declining Balance) and valuation tools such as Price Sales Ratio and PEG Ratio. Designed for immediate integration, the codebase supports static method calls for quick adoption in desktop applications, server-side logic, a

Platforms

Web Self-hosted Windows

Languages

C#

Links

Financial-Formulas Build Status contributions welcome

A collection of methods for solving Finance/Accounting equations, implemented in C#, Java, Python and C++.

See in Action

Finance Calculator - Android Application

Getting Started - Java

  1. Download and import this library into your project:
    import srbrettle.financialformulas.FinancialFormulas;
  2. Use the library methods:
    double result = FinancialFormulas.CalcPriceSalesRatio(500,200);

Getting Started - C# Deprecated - New GitHub Repo

Using NuGet NuGet

  1. Within your project, install FinancialFormulas NuGet package (via "Manage Packages for Solution" or running the following in "Packet Manager Console".
    Install-Package FinancialFormulas -Version 1.0.2
  2. Reference the Namespace:
    using srbrettle.FinancialFormulas;
  3. Use the static library methods:
    double result = FinancialFormulas.CalcPriceSalesRatio(500,200);

Manually

  1. Download and import this library into your project.
  2. Reference the Namespace:
    using srbrettle.FinancialFormulas;
  3. Use the static library methods:
    double result = FinancialFormulas.CalcPriceSalesRatio(500,200);

Getting Started - Python

Note that the mothod and variable names have been changed to meet PEP 8 guidelines.

  1. Download and import this library into your project:
    import srbrettle.financialformulas.FinancialFormulas as calc
  2. Use the library methods:
    assets = calc.calc_price_sales_ratio(500, 200)

Getting Started - C++

  1. Download the source code.
  2. Follow the instructions in Walkthrough: Creating and Using a Static Library (C++)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Formulas / Equations included

  • Asset Turnover
  • Assets
  • Average Collection Period
  • Book Value
  • Cash Conversion Cycle
  • Cash Ratio
  • Current Ratio
  • Debt Equity Ratio
  • Debt Ratio
  • Debt Service Coverage Ratio
  • Declining Balance
  • Dividend Cover
  • Dividend Yield
  • Dividends Per Share
  • Earnings Per Share
  • EBIT
  • EBITDA
  • Efficiency Ratio
  • Equity
  • Gross Profit
  • Gross Profit Margin
  • Inventory Conversion Period
  • Inventory Conversion Ratio
  • Inventory Turnover
  • Long-Term Debt Equity Ratio
  • Liabilities
  • Net Profit
  • Operating Cash Flow Ratio
  • Operating Margin
  • Operating Profit
  • Payables Conversion Period
  • Payout Ratio
  • PEG Ratio
  • Price Sales Ratio
  • Profit Margin
  • Quick Ratio
  • Receivables Conversion Period
  • Receivables Turnover Ratio
  • Return On Assets
  • Return On Capital
  • Return On Equity
  • Return On Investment
  • Return On Net Assets
  • Risk Adjusted Return On Capital
  • Sales Revenue
  • Straight Line Method
  • Units Of Production