Cal11 calculator

Put Assorted Decimals Fractions and Mixed Numbers in Order Calculator

Reviewed by Calculator Editorial Team

This calculator helps you sort a list of mixed numbers, decimals, and fractions in ascending or descending order. Simply enter your numbers, select the sort order, and click "Calculate" to see the sorted result.

How to Use This Calculator

Using this calculator is straightforward:

  1. Enter your numbers in the text area, one per line. You can mix decimals, fractions, and mixed numbers.
  2. Select whether you want to sort in ascending or descending order.
  3. Click the "Calculate" button to see the sorted numbers.
  4. Use the "Reset" button to clear all inputs and results.

The calculator will convert all numbers to a common format (decimals) for accurate sorting, then display the original numbers in the correct order.

How It Works

The calculator follows these steps to sort your numbers:

  1. Parse each input number, converting fractions and mixed numbers to decimals.
  2. Sort the decimal values in the selected order (ascending or descending).
  3. Map the sorted decimal values back to their original number formats.
  4. Display the sorted numbers in the result area.
// Pseudocode for the sorting algorithm function sortNumbers(numbers, order) { // Convert all numbers to decimal values const decimalNumbers = numbers.map(num => { if (isFraction(num)) return fractionToDecimal(num); if (isMixedNumber(num)) return mixedToDecimal(num); return parseFloat(num); }); // Sort based on decimal values decimalNumbers.sort((a, b) => { return order === 'asc' ? a - b : b - a; }); // Map back to original formats return decimalNumbers.map(decimal => { const original = numbers.find(num => { if (isFraction(num)) return fractionToDecimal(num) === decimal; if (isMixedNumber(num)) return mixedToDecimal(num) === decimal; return parseFloat(num) === decimal; }); return original; }); }

The calculator handles these number formats:

  • Decimals (e.g., 3.14, 0.5)
  • Fractions (e.g., 1/2, 3/4)
  • Mixed numbers (e.g., 1 1/2, 3 1/4)

Examples

Example 1: Sorting Mixed Numbers

Input numbers:

  • 2 1/2
  • 1 3/4
  • 3

Sorted in ascending order:

  • 1 3/4
  • 2 1/2
  • 3

Example 2: Sorting Decimals and Fractions

Input numbers:

  • 0.75
  • 1/4
  • 0.5

Sorted in descending order:

  • 0.75
  • 1/2
  • 1/4

FAQ

Can I sort negative numbers?

Yes, the calculator can handle negative numbers in all formats (decimals, fractions, mixed numbers).

What if I enter an invalid number?

The calculator will display an error message if you enter a number that can't be parsed. Please check your input for typos or unsupported formats.

Does the calculator simplify fractions?

No, the calculator preserves the original format of your numbers in the output. It only uses decimal equivalents for sorting purposes.