The widest span in the energy units
Few unit conversions cover as many orders of magnitude as this one. A nanojoule is the energy of a short laser pulse from a small oscillator. A terajoule is the order of energy that a national statistics office uses for the fuel consumed by a large city or an industry in a year. Putting them on one page is an exercise in scale, and the converter makes the arithmetic painless. The joule is the SI unit of energy, equal to one newton-meter, or one watt-second. With the prefix nano for 10^-9 and tera for 10^12, the two units differ by a factor of 10^21. The result for a modest input is therefore a very small decimal. The page converts a stated energy from one unit to the other and does not estimate the energy of any particular process.
The factor and the default result
The page formula is TJ = nJ × 10^-21. With the default input of 10 nJ, the result is 1 × 10^-20 TJ, which in decimal form is 0.00000000000000000001. Floating-point arithmetic sometimes prints this as 1.0000000000000001e-20, with a trailing digit that is only an artifact of binary representation and has no physical meaning. The factor itself is exact, as the SI prefixes are powers of ten, and NIST Special Publication 811 lists them. To convert back, multiply by 10^21. For example, 1 TJ is 10^21 nJ, which is the digit 1 followed by 21 zeros. Anybody who has to write out these numbers by hand should use scientific notation, because counting 21 zeros by eye invites error.
How big is a terajoule
A terajoule is 10^12 joules. Converted to kilowatt-hours, one terajoule is 10^12 divided by 3.6 × 10^6, or about 277,778 kWh. That is roughly the annual electricity consumption of a few dozen households in a country with average consumption, but the number depends on the country, so treat it only as an order of magnitude. By the thermochemical convention for explosives, one kiloton of TNT is defined as 4.184 × 10^12 J, so one terajoule is about 0.239 kilotons of TNT. Statistics agencies report national fuel and energy figures in terajoules or petajoules, because the numbers in joules are huge. The converter lets you see how a terajoule would be expressed in the tiny nanojoule unit used by physicists and chip designers: 10^21 of them.
How small is a nanojoule
A nanojoule is a billionth of a joule. Femtosecond laser oscillators emit pulses with energies from a fraction of a nanojoule up to several nanojoules, and these pulses are still intense because they are so short. The energy a modern processor core spends on a single simple operation is on the order of picojoules, a thousand times lower than a nanojoule, while the energy of a radio packet transmission from a low-power wireless node is in the microjoule range. A visible photon carries about 4 × 10^-19 J, which is 4 × 10^-10 nJ. These are orders of magnitude and not data for a particular device. The converter has no way of knowing the physics. It takes the energy in nJ and writes it in the larger unit, and the small decimal result reflects the scale gap and not an error.
A second example: a laser pulse
Suppose a pulse carries 750 nJ. In terajoules that is 750 × 10^-21, or 7.5 × 10^-19 TJ. A pulse of 2.5 nJ is 2.5 × 10^-21 TJ. These numbers are so small that a terajoule is never the right unit for them, and the conversion demonstrates the point. A more natural conversion for a pulse of 750 nJ is to 0.75 µJ or 7.5 × 10^-7 J. To make the comparison in the other direction, 1 TJ in nanojoules is 10^21 nJ. If a pulse at 750 nJ were repeated 1,000 times per second, the average power would be 0.75 mW. At that rate it would take more than 40 million years to deliver 1 TJ, since 10^12 J divided by 0.00075 W is about 1.3 × 10^15 s. The figures are illustrative, and the exercise shows how the scale gap plays out.
Reading very small results
The result in terajoules is a decimal with many zeros, and it may appear in exponent notation such as 1e-20, which stands for 1 × 10^-20. Do not drop the minus sign in the exponent. A positive exponent would describe a very large number and not a very small one. When you copy the result into a spreadsheet or a script, paste it as a number and not as text, so that the software parses the exponent. In reports, write the value in scientific notation with a sensible number of significant figures. If the inputs are measurements with two or three significant figures, quoting 1.0000000000000001e-20 is misleading, and 1.0 × 10^-20 TJ is the honest form. The artifact digits come from floating-point storage and not from the physical quantity.
Energy versus power and why both appear
Energy and power are often confused, especially around electricity bills. Energy is the capacity to do work, measured in joules or kilowatt-hours. Power is the rate at which energy flows, measured in watts, which are joules per second. A terajoule of energy delivered over a year corresponds to an average power of about 31.7 kW, since 10^12 J divided by 3.156 × 10^7 s is about 31,700 W. A nanojoule delivered in a nanosecond is 1 W. The converter works only with energy. If your source quotes a power, multiply by a time to obtain energy before converting. If your source quotes a rate per year, remember that the number of seconds in a year is about 31.56 million.
Common mistakes
The first mistake is to use the wrong direction. Converting nanojoules to terajoules should make the number far smaller. If your result is larger than the input, something went wrong. The second is the exponent: the factor 10^21 is the product of 10^9 and 10^12, and using only one of them gives a result off by a factor of a thousand or more. The third is to confuse tera with the lower-case t, which is not an SI prefix, and to confuse the unit symbol TJ with TW, a unit of power, or TWh, an unrelated energy unit used in electricity statistics. A terawatt-hour equals 3.6 petajoules, which is 3,600 terajoules. A fourth is to treat a calorie as a Calorie: a food Calorie is a kilocalorie. Careful labeling of every number with its unit prevents most of these slips.
A food energy comparison
Food energy is another way to feel the scale. One thermochemical kilocalorie, the food Calorie, is 4,184 J. A snack of 200 kilocalories therefore carries 836,800 J, which is 8.368 × 10^-7 TJ. In nanojoules, the same snack is 8.368 × 10^14 nJ. A single nanojoule is then a tiny fraction of a snack, about 1.2 × 10^-15 of it. A day's food energy of 2,000 kilocalories is 8.368 million joules, or about 8.4 × 10^-6 TJ. Nutrition labels in many countries list energy in kilojoules next to kilocalories, so 836.8 kJ would appear for the snack. The numbers are illustrative and are not dietary advice. They are given to show how the same energy can be expressed in units that differ by twenty-one orders of magnitude.
Terajoules in energy statistics
National energy balances and fuel statistics commonly report in terajoules or petajoules, where one petajoule is 1,000 terajoules. The reason is practical: a country's annual fuel use in joules would be a number with eighteen or more digits. One gigawatt-hour of electricity is 3.6 terajoules, and one terawatt-hour is 3,600 terajoules. Agencies such as the International Energy Agency and national statistics offices publish tables with their own conversion conventions, including the net or gross heating value of fuels, so a number converted here with exact SI factors may differ from a figure in a report that uses a fuel-specific factor. The converter applies the exact SI relation between joules and its prefixed units. When you compare against a published table, check how that table defines its energy units before you trust a small difference.
Spreadsheet and script handling
If you convert many values, the safest approach is to keep the energy in joules as the working unit and apply the prefix only when you display a number. Store 7.5 × 10^-7 J instead of 750 nJ, and divide by 10^12 only at the end to show terajoules. Floating-point numbers handle exponents from about 10^-308 to 10^308, so the 21 orders of magnitude on this page are no problem for the computation. The risk is in the text, where a missing minus sign in an exponent or a stray digit turns a tiny number into a huge one. Add a sanity check in any script, such as asserting that a result in terajoules is smaller than the same energy in joules. Documenting the unit in the column name, for example energy_nJ and energy_TJ, prevents most errors in shared files.
Scope and sources
This page converts a known energy between nanojoules and terajoules and other energy units. It does not estimate the energy content of fuels, processes or devices, and it makes no claim about efficiency or cost. The joule, the prefixes and the conversion factors for the other units come from NIST Special Publication 811, including its appendix of conversion factors, and from the BIPM SI Brochure. The result is exact up to floating-point representation. For official energy statistics, use the definitions and conversion factors of the agency that publishes them, which sometimes differ in the calorie or BTU definition.