Sub topic 4
Quick answers: math, conversions, and definitions
Spotlight can answer simple questions directly in its results window, so you do not have to open Calculator, a converter website, or the Dictionary app. This chapter assumes you can open Spotlight with Command-Space and read its results list, as covered in the previous chapters.
How quick answers work
When you type, Spotlight checks whether your text looks like a calculation, a unit conversion, or a word to define. If it does, the answer appears at the top of the results. Nothing is saved or opened. You read the answer, then clear the field or press Escape.
The calculation and conversion work happens on your Mac. Definitions come from the Dictionary data that macOS ships with. Which of these results appear depends on the result categories you enable in Spotlight settings. If a quick answer never shows, check those settings first (a later chapter covers them).
Calculations
Type an arithmetic expression. Spotlight accepts the usual operators: +, -, *, /, and parentheses. It also understands percentages written with "of".
18% of 240
12 * 7.5
(1250 + 380) / 4The first line returns 43.2, the second 90, and the third 407.5. Parentheses control the order of operations as in ordinary math, so use them whenever a result looks wrong.
Click the answer, or press Command-C while it is selected, to copy the number. You can then paste it into the document you are working on.
Unit conversions
Write the amount, the unit, and the unit you want. Spotlight understands length, weight, temperature, volume, and many other units. It also converts currency.
12 km in miles
72 fahrenheit in celsius
3 cups in ml
100 usd in eurThe word between the units can be "in" or "to". Currency uses exchange rates fetched from the internet, so a currency result needs a connection and may differ slightly from your bank's rate. Unit conversions such as kilometers to miles work offline.
Definitions
Type a word to see its dictionary entry among the results. Select the entry to read the definition in the preview pane on the right.
ephemeralIf you type a word that is also a file name or an app name, the dictionary result may appear below other matches. Scroll the list, or use the arrow keys to move to the Definition entry.
When a quick answer does not appear
Spotlight guesses what you mean, and sometimes it guesses a search instead of a calculation. These are the common causes:
- Unrecognized units.
5 stone in kilosworks, but a misspelled or ambiguous unit is treated as a file search. Try the full unit name. - Odd symbols. Typographic characters pasted from a web page, such as a "×" sign or a non-breaking space, can stop the calculation from being recognized. Retype the expression with plain keys.
- Disabled categories. If you turned off the Calculator, Conversion, or Definition categories in Spotlight settings, those answers are hidden.
- Slow or missing currency rates. Without a network connection, a currency conversion may not appear.
A worked example
Suppose you are following a recipe in US units and need to scale it for a different number of guests.
- Open Spotlight with Command-Space.
- Type
3 cups in mland read the converted volume. - Clear the field and type
710 * 1.5to scale the amount by one and a half. - Type
1.5 tbsp in mlfor the next ingredient.
You get your numbers without leaving the recipe window.
Summary
- Type a calculation, a conversion, or a word, and read the answer at the top of the results.
- Use plain keyboard characters and parentheses to keep expressions unambiguous.
- If no answer appears, check the unit spelling, the symbols, and your enabled result categories.
Exercise
You type 15% of 80 and Spotlight shows a list of files instead of a number. Name two things you could check.
Show answer
Check that the Calculator category is enabled in Spotlight settings, and retype the expression using plain keyboard characters in case a pasted symbol or special space is stopping it from being recognized. Also try the equivalent form 80 * 0.15, which should give 12.
Exercise
Write the Spotlight text that converts 5 miles to kilometers, and explain why a currency conversion may fail while this one works.
Show answer
Type 5 miles in km. Unit conversions are computed on the Mac, so they work offline. Currency conversions need current exchange rates from the internet, so they can fail without a connection.