How to Run Wolfram Language Code in Wolfram Cloud

Updated

Wolfram Cloud provides cloud access to the Wolfram Language, so you can write and evaluate code directly in a browser without installing anything locally. To run your first piece of Wolfram Language code, you need a Wolfram Cloud account, a browser, and an internet connection. The basic workflow is: sign in, open a notebook, type code into a cell, evaluate it, and read the output below the cell.

Sign In and Open a Notebook

  1. Go to wolframcloud.com in a modern browser.
  2. Sign in with your Wolfram ID. If you do not have one, create an account from the sign-in page.
  3. From the cloud interface, create a new notebook. In the Wolfram Cloud notebook environment, a notebook is the document type that holds Wolfram Language input and output.

If you are not signed in, the cloud will prompt you for credentials before letting you create or save notebooks. Account and payment requirements are covered separately in the question "Do You Need an Account or Payment to Use Wolfram Cloud?"

Enter and Evaluate Wolfram Language Code

A notebook is organized into cells. Each cell can contain Wolfram Language input.

  1. Click into the first empty cell.
  2. Type a Wolfram Language expression. For example:
2 + 2
  1. Evaluate the cell. In the Wolfram Cloud notebook interface, use Shift + Enter to evaluate the current cell. The result appears in an output cell directly below the input cell.

The expected result for 2 + 2 is:

4

You can evaluate more than arithmetic. For example, to generate a plot:

Plot[Sin[x], {x, 0, 2 Pi}]

After Shift + Enter, the output is a rendered plot below the input cell.

What Happens When You Evaluate

  • The cloud sends the cell contents to a Wolfram Language kernel.
  • The kernel evaluates the expression.
  • The result is returned and displayed as an output cell in the notebook.
  • If the expression produces an error, the output cell shows the error message instead of a result.

View Output and Save Your Notebook

  • Output appears in the cell immediately below the evaluated input cell.
  • To save, use the notebook's save action in the cloud interface. Because the notebook lives in the cloud, saving stores it in your Wolfram Cloud account rather than on your local machine.
  • To reopen it later, sign in to wolframcloud.com and open the saved notebook from your cloud files.

Get Help and Example Code

  • Use the Wolfram Language documentation to look up functions and see examples. The documentation is accessible from the Wolfram Cloud interface and from the Wolfram Language documentation site.
  • Many documentation pages include ready-to-run examples. You can copy an example into a notebook cell and evaluate it with Shift + Enter to see the result.
  • If you want to explore without writing from scratch, start from a documentation example and modify one part at a time.

Common Snags

  • Nothing happens on Enter alone. In a notebook, plain Enter inserts a newline. Use Shift + Enter to evaluate.
  • You are asked to sign in before creating a notebook. The cloud requires an account to create and save notebooks.
  • Output does not appear. Check that the cell actually contains Wolfram Language input and that you evaluated it. If there is an error, read the message in the output cell.
  • You cannot find a saved notebook. Confirm you are signed in with the same Wolfram ID you used when saving it.