This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Fractional to decimal conversion


usddec = todecimal(quote,fracpart)


usddec = todecimal(quote,fracpart) returns the decimal equivalent, usddec, of a security whose price is normally quoted as a whole number and a fraction (quote). fracpart indicates the fractional base (denominator) with which the security is normally quoted (default = 32).


In the Wall Street Journal, bond prices are quoted in fractional form based on a denominator of 32. For example, if you see the quoted price is 100:05 it means 100 5/32. To find the equivalent decimal value, enter

usddec = todecimal(100.05)
usddec = 
usddec = todecimal(97.04, 16)
usddec =


The convention of using . (period) as a substitute for : (colon) in the input is adopted from Excel® software.

Introduced before R2006a