How many lines of source code does Monero have? How does that number compare with the amount of Bitcoin source code?

2 Answers 2


I do not know the exact number of lines of Monero source code, but there are a few methods to calculate it, which are described here.

Monero is not based on the Bitcoin code base and is rather complex. Because of this there has been a major effort to document and cleanup Monero source code:

There are over 70,000 lines of source in the src/ folder alone, and there is code in other folders that brings the total to over 100k, so this is no small task!

The Bitcoin source code has grown dramatically since its inception. In early years Bitcoin only had about 3k lines of source code, as described by Greg Maxwell. Currently, the Bitcoin Core source code contains more 100k lines of code which is roughly equivalent to Monero.

Documentation for Bitcoin is far better than it is for Monero making it much easier for developers to understand. This was the motivating factor for the Monero source code cleanup effort and is far more important than the number of lines of source code.


Using David A. Wheeler's SLOCcount (http://www.dwheeler.com/sloccount), the canonical tool for counting such things, Monero appears to be about 65k lines of C++ code and 5k lines of C code (src and contrib/epee), as well as about 17k of crypto code, most of it derived from Daniel Bernstein's crypto code. Ancillary libraries not counted (unbound, lmdb, etc).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.