SI defines 7 base units: s, m, kg, A, K, mol, cd. There are 22 of derived units with their own symbols defined. These correspond to the base ones like so:

Derived unit | Equivalent using base units |
---|

rad | 1 |

sr | 1 |

Hz | s^-1 |

N | kg m s^-2 |

Pa | kg m^-1 s^-2 |

J | kg m^2 s^-2 |

Derived unit | Equivalent using base units |
---|

W | kg m^2 s^-3 |

C | s A |

V | kg m^2 s^-3 A^-1 |

F | kg^-1 m^-2 s^4 A^2 |

Ω | kg m^2 s^-3 A^-2 |

S | kg^-1 m^-2 s^3 A^2 |

Derived unit | Equivalent using base units |
---|

Wb | kg m^2 s^-2 A^-1 |

T | kg s^-2 A^-1 |

H | kg m^2 s^-2 A^-2 |

°C | K |

lm | cd |

lx | cd m^-2 |

Derived unit | Equivalent using base units |
---|

Bq | s^-1 |

Gy | m^2 s^-2 |

Sv | m^2 s^-2 |

kat | mol s^-1 |

Note: 1 °C = 1 K when we talk about difference of temperatures.

SI further defines 24 prefixes denoting exponents of 10:

Symbol | Quantity |
---|

Q | 10^30 |

R | 10^27 |

Y | 10^24 |

Z | 10^21 |

E | 10^18 |

P | 10^15 |

Symbol | Quantity |
---|

T | 10^12 |

G | 10^9 |

M | 10^6 |

k | 10^3 |

h | 10^2 |

da | 10 |

Symbol | Quantity |
---|

d | 10^-1 |

c | 10^-2 |

m | 10^-3 |

μ | 10^-6 |

n | 10^-9 |

p | 10^-12 |

Symbol | Quantity |
---|

f | 10^-15 |

a | 10^-18 |

z | 10^-21 |

y | 10^-24 |

r | 10^-27 |

q | 10^-30 |

Each input comprises of a (optional) prefix and one of the base or derived units symbol. Each such input should be convert to product of a power of 10 and a product of base units, as described in the tables above. Missing prefix should be mapped to 1.

For example, "MJ" should be converted to "10^6 kg m^2 s^-2".