71

Is there any logical reason behind digit alignment on a calculator? If yes, can we apply this for visual interfaces of numbers on the web?

enter image description here

8
  • 5
    I suggest your second sentence, "can we apply this for visual interface of numbers on web?" should be clarified and asked as a separate question. I don't understand it, and none of the answers so far address it. By the way, I think the answer is "yes: for example, this is how numbers are displayed on web shopping carts and invoices"
    – dcorking
    Jan 20, 2015 at 9:56
  • 3
    So you mean like right-aligned <input type=number> versus left-aligned <input type=text>?
    – Crissov
    Jan 20, 2015 at 14:12
  • 9
    Before I read the answers I thought this question was why the 7 LED display of a the digit "1" uses the right instead of the left two diodes. - In that case I would have replied with Benford's law. - And then I noticed that probably none of you remember calculators with 7 LED digits ... Jan 20, 2015 at 16:49
  • 11
    @PierreArlaud Readability is inherently a UX issue. The idea that this isn't appropriately for UX.se is mind-boggling to me. Jan 20, 2015 at 20:13
  • 4
    They still make them. I think he wants people off his lawn.
    – user57078
    Jan 22, 2015 at 14:16

7 Answers 7

139

Screen digits are right aligned to maintain positional consistency between what a number represents (in base 10 that would be units, tens, hundreds, etc.).

E.g. If I were to have 764 and then multiply it by 24, the answer would be 18336. By aligning to the right I've consistently seen the same unit representation in the same position, and when I've had new units (the 1 and 8 in 18336), they have appeared in a new position.

It also allows there to be a consistent alignment between character groupings (typically every 1000, but in some cases 100s and 10,000s)

left vs right aligned numbers

Can we apply this for visual interface of numbers on web?

Yes, we can, and indeed we should. Left aligned numbers when listed below each other are a disaster and should be avoided. I can't think of a single case where this isn't true. If you want to just use a number in a sentence, then go ahead and left align, as there is no positional consistency to maintain in the first place.


As a side note, the underlying reason why they are right aligned instead of left aligned is that the modern number system was adopted from Arabic, which is a right to left language and hence right aligned. It's worth mentioning that the Arabs adopted it from the Indians (who were mostly Hindu), which is why it's often called an Arabic-Hindu number system. The European number systems pretty much sucked.

23
  • 16
    great that you also explained the origins of numbers...
    – Abektes
    Jan 20, 2015 at 9:52
  • 8
    Of course, you run into problems as soon as you put a decimal point in your number... Say goodbye to all alignments there! ... Hmm, now I'm wondering what it would be like to have a decimal-aligned calculator... Jan 20, 2015 at 13:49
  • 11
    One might add that right-aligning is not sufficient; it should also be in a fixed-width font.
    – gerrit
    Jan 20, 2015 at 16:40
  • 9
    @gerrit: you'll notice that in most proportional fonts all the numbers have the same width for this exact reason (management wants their spreadsheets in a good looking font, but with digits neatly aligned). Jan 21, 2015 at 9:30
  • 4
    @OllieFord That is actually the way it was dealt with in most of Europe. It's why in old English you said "four and twenty" and why in Dutch you still say the equivalent of "four and twenty" rather than "twenty-four".
    – JohnGB
    Jan 21, 2015 at 15:28
40

Digits are right aligned for similar reasons as you would right align them in a spreadsheet or a table.

i.e. when you see multiple numbers (and they all have a fixed set of decimal places), then it's easier to compare the numbers with each other because the digits corresponding to each place value are in the same physical position, thus making it easier to compare input and result - we are simply used to expecting a place-value digit in a consistent location.

Yes a simple calculator only has one number displayed, but nevertheless you do multiple calculations one after the other and the results are less likely to be mis-read if there is a common reliable placement of the decimal point. When left aligned, and reading from left to right, there is a need to first scan the number to determine it's size and the location of the decimal point before making sense of the number itself. Locating the decimal point to the right makes this sense-making process consistently easier.

This may extend back to the use of mechanical adding machines, used for bookkeeping or accumulating prices of objects, where there would always be two decimal places, (no more, no less) and these were fixed on the right hand side of the machine. The German example below shows numbers in a European (non British) format.

All the unused digits are zeroed. On a calculator they are simply absent.


enter image description here

"Mechanical calculating machine". Licensed under CC BY-SA 3.0 via Wikimedia Commons.


With the invention of mechanical calculators, like Pascal's calculator of 1642, everything was mechanical, so the position of place values was physically determined by wheels or dials, much like the adding machine above.

I suppose the fixed position of digits goes back to the abacus, before written number systems came into effect. Beads moved on wooden columns that were fixed in position. Unused columns (i.e. when showing smaller numbers) to the left and the used columns (if any) coming from the right.

Can we apply this for visual interface of numbers on web?

Of course and this is commonly the default case in user interface elements that display values that are specified as currency for example, or tables that display numbers in a columnar format.

Fields that can take either characters or digits have an alignment property so you can adjust accordingly. However - note that there is a big difference between entering or displaying a number because it's a standalone quantity, or a label or a telephone number, for example, and entering a number for the purpose of doing a mathematical operation or displaying accounting values. There is no need to right align all numbers - you do have to consider context as to whether it's useful for the user to see the numbers aligned left, right or centered!

As an example, on the right hand side of this page are a list of related questions. You wouldn't right-align the number of votes displayed against them 'just because it's a number', but if you were numbering sections in a document, you might.

enter image description here

3
  • 7
    How can you trust the results of an adding machine called the "Resulta BS"? Jan 20, 2015 at 20:15
  • 1
    @RyanAnderson haha - I didn't even spot that! Jan 20, 2015 at 20:22
  • 1
    Actually, the adding machine is showing the result in a european format. U.S. representation would have a comma separating the groups of thousands, and a period for the decimal point. Jan 20, 2015 at 21:16
13

I don't have any data about this question, neverthless here my thought: Readability is much better for right aligned numbers. Why? Consistency. The Decimal points always stays at the same location, decimal separators too. So it is much easier for a user to identify how big a number is.

mockup

download bmml source – Wireframes created with Balsamiq Mockups

PS: We are probably very biased by now, so my point with readability could be absolutley wrong. Maybe it was just a technical constraint when they first built calculators.

1
  • 2
    In my experience of pocket calculators, decimal separators don't stay at the same location at all. Jan 22, 2015 at 11:18
10

When using right aligned numbers you must note that decimal separators are aligned only if there are equal amount digits after decimal separator:

   12 345,90
132 987,9376

Aligning such numbers left would probably be even worse, so in cases where number of digits after decimal separator are not equal numbers should probably be aligned by decimal separator.

 12 345,90
132 987,9376
5

In general, columns of numbers which are being examined as numbers should be decimal-point aligned (or right-aligned if the only decimal point is "implied"). Quantities which involve more than one radix point (e.g. currency amount in Britain prior to decimalization) should align each radix point, and right-align the columns between them; e.g. an itemized bill might read:

 1. 0. 3
  .10. 6
23.13.11
--------
25. 4. 8

Times written in hours/minutes/seconds would follow a similar rule, but for the fact that all parts other than the most significant are written with a fixed number of digits and include leading zeroes.

When calculators are set to display a fixed number of digits to the right of the decimal point (a common feature on adding machines, though not on cheap handhelds), they obey this principle. Calculators in floating-decimal mode (the only mode available on many cheap handhelds) generally align decimal numbers as they do because it's consistent with their behavior when using whole numbers (which keep the decimal point at the far right) and because it makes the electronics simplest.

When using right alignment, nothing has to keep track of how many digits are entered. If each digit uses five bits (four to hold the value and one for the decimal point), entry of the decimal is allowed whenever none has been entered yet, and entry of anything else is allowed when all bits for the leftmost place are zero (the digit is zero and there's no decimal point). Further, the display electronics can unconditionally blank leading zeroes that don't have their decimal flag set. Allowing numbers to be entered left-to-right would require keeping track of how many digits were entered, and adding hardware to the display circuitry to distinguish "one point two" from "one point two zero" [the latter should show an extra trailing zero].

Because people expect to be able to pick up any calculator and simply use it without "surprises", it's generally better for an ordinary-looking calculator to behave in fashion consistent with other such calculators than for it to do anything unusual. Unless a calculator will have some features that would really benefit from having the display fill left-to-right, it will probably be better to have it scroll right-to-left in the same was as 99.9% of other calculators on the planet.

1
  • Of course, the reason the calculator does not follow this is at least in part because it is an input device, and doesn't know a-priori how many more digits will be entered before the point.
    – Ben Voigt
    Jan 22, 2015 at 23:03
2

In our system, numbers in our common calculators are shown in powers of ten. Let’s take a number ‘8634’.

8634 = 8x1000+ 6 x100 + 3 x10 + 4 x1

So starting from right to left, we have 0 power 10 then 1 power 10 then 2 powers 10 and so on.

To keep it simple, this tradition makes readability easy from right to left.

0

I would dare even a different reason: Because we made the historical error of making the least-significant digit position at the right, when everything we write is from left-to-right.

I will explain with an example. Now consider this addition, which parcels have their least-significant digit at the left:

"one,seventy,five-hundred" plus

"three, twenty, eight-hundred, six-thousand"

+
175
3286
————
4937

It gives as result

"four, ninety, three-hundred, seven-thousand"

Wouldn't it fit better and feel more natural to have the calculation like this on our left-to-right writing system?

Your Answer

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

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