Currently Emacs calculator (calculator not calc) only shows, up to three digit decimal values. For example calculating 22/7 gives 3.143. Is it possible to increase the number of displayed digit decimal in Emacs calculator?

  • Please clarify which Emacs calculator you are asking about. calc or something else?
    – Drew
    Commented Feb 13, 2015 at 15:03
  • @Drew I think he was clear to begin with. I just didn't know there was an emacs calculator, I thought calc was it!
    – Tyler
    Commented Feb 13, 2015 at 15:05
  • 2
    While we are at it, there's also quick-calc; I have been using it with my custom math commands like alog10, dbv, next2pow, etc Commented Feb 13, 2015 at 22:01

3 Answers 3


In calculator mode, { and } control how many digits are displayed.



From the manual, available in emacs here:

(info "(calc)Precision")

7.2 Precision

The ‘p’ (‘calc-precision’) command controls the precision to which floating-point calculations are carried. The precision must be at least 3 digits and may be arbitrarily high, within the limits of memory and time. This affects only floats: Integer and rational calculations are always carried out with as many digits as necessary.

The ‘p’ key prompts for the current precision. If you wish you can instead give the precision as a numeric prefix argument.

  • I use calculator by M-x calculator. Contrary to the calc-mode (M-x calc), it seems that precision p doesn't work there.
    – Name
    Commented Feb 13, 2015 at 14:34
  • Right you are. I'll leave this here for others looking for calc, but I see @SueD.Nymme has given you the correct answer for calculator.
    – Tyler
    Commented Feb 13, 2015 at 15:08

This is an easy one: p the number entered afterwards controls the precision of floating-point calculations.

  • For calc this works. What about the calculator as in my question?
    – Name
    Commented Feb 13, 2015 at 14:26
  • @Name oh... I haven't even though about it. But I see the answer has already been given. I'll live it until the evening and then remove. No need to duplicate the answers.
    – wvxvw
    Commented Feb 13, 2015 at 17:31
  • Your answer is still helpful for calc.
    – Name
    Commented Feb 13, 2015 at 17:38

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.