Create a Roman Numeral calculator Create a basic calculator for Roman numerals.
Requirements

Supports +,-,*,/
Input and output should expect only one subtractor prefix per symbol (i.e. 3 can't be IIV because there are two I's before V)
Handling of the subtraction principle in input and output must at minimum support modern standard conventions, in which only powers of ten are subtracted from larger numbers (e.g. I,X,C are required subtractors but not V,L,D) and subtraction is never done from a number more than 10x the subtractor (e.g. IX must be supported but IC is not required).
Input and output should be left to right in order of value, starting with the largest (i.e. 19 = XIX not IXX, 10 is larger than 9)
Left to right, no operator precedence, as if you were using a hand calculator.
Supports whole positive numbers input/output between 1-4999 (no need for V̅)
No libraries that do roman numeral conversion for you

For you to decide

Case sensitivity
Spaces or no spaces on input
What happens if you get a decimal output. Truncate, no answer, error, etc..
What to do for output that you can't handle. Negatives or numbers to large to be printed.
Whether to support a more liberal use of the subtraction principle than the minimum requirement.

Extra Credit

-50 - Handle up to 99999 or larger. Symbols must include a vinculum

Sample input/output
XIX + LXXX                 (19+80)
XCIX

XCIX + I / L * D + IV      (99+1/50*500+4)
MIV

The shortest code wins.
JavaScript (ES6), 238

c=s=&gt;{X={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1}
n=eval('W='+s.replace(/[\w]+/g,n=&gt;(o=0,n.replace(/[MDLV]|C[MD]?|X[CL]?|I[XV]?/g,d=&gt;o+=X[d]),
o+';W=W')));o='';for(i in X)while(n&gt;=X[i])o+=i,n-=X[i];return o}


Usage:

c("XIX + LXXX")
&gt; "XCIX"
c('XCIX + I / L * D + IV')
&gt; "MIV"


Annotated version:

/**
 * Process basic calculation for roman numerals.
 * 
 * @param {String} s The calculation to perform
 * @return {String} The result in roman numerals
 */
c = s =&gt; {
  // Create a lookup table.
  X = {
    M: 1e3, CM: 900, D: 500, CD: 400, C: 100, XC: 90, 
    L: 50,  XL: 40,  X: 10,  IX: 9,   V: 5,   IV: 4, I: 1
  };
  // Do the calculation.
  // 
  // The evaluated string is instrumented to as below:
  //   99+1/50*500+4 -&gt; W=99;W=W+1;W=W/50;W=W*500;W=W+4;W=W
  //                 -&gt; 1004
  n = eval('W=' + s.replace(
    // Match all roman numerals.
    /[\w]+/g,
    // Convert the roman number into an integer.
    n =&gt; (
      o = 0,
      n.replace(
        /[MDLV]|C[MD]?|X[CL]?|I[XV]?/g,
        d =&gt; o += X[d]
      ),
      // Instrument number to operate left-side operations.
      o + ';W=W'
    )
  ));

  // Convert the result into roman numerals.
  o = '';
  for (i in X)
    while (n &gt;= X[i])
      o += i,
      n -= X[i];

  // Return calculation result.
  return o
}