Kotlin Money

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. money

    The library supports arithmetic operations with monetary amounts, calculations with percentages, and allocation, making it simple to model use cases like installment payments (e.g., buy now, pay later), foreign exchange, investment yields, and tax collection. Cryptocurrencies are also fully supported out of the box. (by eriksencosta)

    What do you think of this? https://github.com/eriksencosta/money/blob/enum-percentage-s...

    It is a (quick) spike solution, but I've implemented the currency codes as enums and added support for 20.percent.

    Not so sure about supporting 50.btc and 25.3.usd. I need to check if doing so would affect code completion.

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. manifold

    Manifold is a Java compiler plugin, its features include Metaprogramming, Properties, Extension Methods, Operator Overloading, Templates, a Preprocessor, and more.

    Generally, the idea is that there is no incompatibility between units. Money is a bit exotic given its abstract nature wrt units / exchange rates.

    For instance, physical dimension store values as SI units, regardless of supplied unit, but retain the supplied unit type as a display hint.

    Here, the Length dimension illustrates working with amounts of any unit.

    Length orbit = 250 mi;

    Length moon = 238000 km;

    Length landing = moon + orbit;

    display(landing); // prints 148,136.344 mi

    display(landing.to(km)); // prints 238,402.336 km

    // where

    display(landing.to(mi) == landing.to(km)); // prints true

    // perhaps a better example

    Rate rate = 1.41 km/s;

    Time duration = 76 hours;

    Length distance = rate * duration;

    // make your own unit constants

    RateUnit kps = km/s;

    rate = 1.41 kps;

    You can play with the manifold-science[1] project, it implements the complete SI physical dimensions and many derived dimensions along with comprehensive operator overloading[2] support etc. to make working with and reading code using quantities more productive in Java.

    1. https://github.com/manifold-systems/manifold/tree/master/man...

    2. https://github.com/manifold-systems/manifold/tree/master/man...

  4. money-kotlin

    Kotlin extensions for javax.money (Moneta) JSR 354

    How does it compare to the Java money API (https://jcp.org/en/jsr/detail?id=354) and the related Kotlin DSL in https://github.com/hiddewie/money-kotlin/?tab=readme-ov-file...?

  5. currency

    Currency handling for Go.

    I like the support for custom currencies, as that is an edge case that often pops up.

    On the other hand, be careful about tying the symbol to the currency, as symbols are locale specific. For example, the symbol for USD is $ in eu-US but US$ in en-CA and en-AU (Canada and Australia), and then $US in French locales.

    https://cldr.unicode.org/ is the magical dataset behind most good implementations that deal with currency display. Updated twice a year, available in JSON, providing currency symbols and formatting rules for all locales, as well as country => currency mappings and other useful information.

    Disclaimer: I maintain a Go solution in this problem space: https://github.com/bojanz/currency

  6. Joda-Money

    Java library to represent monetary amounts.

    I'm surprised nobody has mentioned Joda Money yet:

    https://www.joda.org/joda-money/

    From the same person that brought is Joda Time (ie, what the java time API was based on). I've used Joda Money a lot and it's great.

    Honestly I prefer APIs that look like APIs and I think this trend towards inventing DSLs is a bad one. Rails works because there's a critical mass of people who have adopted what is essentially a whole new language on top of Ruby. A money library doesn't warrant a new language, it's unnecessary cognitive load.

  7. really-safe-money

    Uncompromisingly safe money library

    Nice. Looks like it satisfies all the requirements detailed here [0]. Also, good discussion of the major difficulty dealing with money here [1].

    [0] https://cs-syd.eu/posts/2022-08-22-how-to-deal-with-money-in...

  8. dinero

    Discontinued Moved to https://codeberg.org/sernamar/dinero (by sernamar)

    I'm working on a Clojure library for working with money [0] that handles specific rounding rules by passing a custom rounding function to the round function, allowing you to specify different rules as needed.

    There's an example for the Swiss Franc in the README (the code is here [1]).

    [0] https://github.com/sernamar/dinero

    [1] https://github.com/sernamar/dinero/blob/main/src/dinero/roun...

  9. Chronicle-Core

    Low level access to native memory, JVM and OS.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • (Java)Money and Kotlin

    2 projects | dev.to | 17 Apr 2021
  • Your Codename One App, Now A Native Mac App

    1 project | dev.to | 13 Jun 2026
  • OpenAPI, ORM, SVG and Lottie

    2 projects | dev.to | 8 Jun 2026
  • AI, OAuth, And Other Platform APIs In The Core

    1 project | dev.to | 8 Jun 2026
  • On-Device Debugging And JUnit 5

    2 projects | dev.to | 6 Jun 2026

Did you know that Java is
the 10th most popular programming language
based on number of references?