Knowledge of the composition (mineral and fluid proportions) of rock formation lithologies is important for petrophysical and rock physics analysis. The mineralogy of a rock formation can be estimated by solving a system of linear equations that relate a class of geophysical log measurements to the petrophysical properties of known minerals and fluids. This method is useful for carbonate rocks with complex mineralogies and a wide range of other lithologies. Although this method of linear inversion for rock composition is well known, there are no interactive, open-source programs for routinely estimating rock mineralogy from standard digital geophysical wireline logs. We present an interactive open-source program, MinInversion, for constructing a balanced system of linear equations from digital geophysical logs and estimating the rock mineralogy as an inverse problem. MinInversion makes use of a library of petrophysical properties that can be easily expanded and modified by the users. MinInversion also provides several options for solving the system of linear equations and executing the linear matrix inversion including least squares, LU-decomposition and Moore-Penrose generalized inverse methods. In addition, MinInversion enables the estimation of the joint probability distributions for constituent minerals and measured porosity. The joint probability distributions are useful for revealing and analyzing depositional or diagenetic composition trends that affect porosity. The program introduces ease and flexibility to the problems of rock formation composition analysis and the study of the effects of rock composition on porosity.