ShareShortcuts

Calculate Tip & Split

idelaware
Fork “Calculate Tip & Split”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so idelaware gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
75K
Saved
1
Actions
58
Category
Calculations
Version
5.0
Language
EN

UPDATED WITH A FULL TIP TABLE: I can always figure out the tip in my head for myself, however the real reason and need for a calculator (for me) has always been when we have a group of people and everyone wants to be fair. Once you enter your bill amount, the calculator will do a regular calculation (if you want) and present you with options for 10%, 15%, 18%, and 20%, all rounded UP to the nearest dollar. (I did this because I believe that rounding down is rather rude.)

However, if you want to split the bill, you can run the shortcut, enter your total bill, enter the number of people who will be splitting the bill, and it will present you with the same percentage options, slightly rounded to the nearest few cents (as you can see from the final bill amounts of different cents on the dollar). This will allow you quick access to a full tip amount, split as fairly as possible.

What's New

Version 5.0

Complete rewrite with tip tables and easy to view options.

Version History
5.0 Oct 28, 2018

Complete rewrite with tip tables and easy to view options.

4.0 Oct 26, 2018

Final version (hopefully), fixed formatting for final message to the user.

3.0 Oct 22, 2018

Streamlined final result by formatting numbers correctly.

2.0 Oct 22, 2018

Fixed dialogue for tip splitting, indicating the $ amount of tip included in the split.

1.0 Oct 22, 2018

First release

What it does

58 actions
  1. Ask for Input
    How much is the total bill?
  2. Format Number
  3. Number
  4. Calculate
  5. Round Number
  6. Calculate
  7. Format Number
  8. Number
  9. Calculate
  10. Round Number
  11. Calculate
  12. Format Number
  13. Number
  14. Calculate
  15. Round Number
  16. Calculate
  17. Format Number
  18. Number
  19. Calculate
  20. Round Number
  21. Calculate
  22. Format Number
  23. Choose from Menu
    Are you splitting this bill?
  24. Choose from Menu
    No
  25. Show Alert
    Here are suggested tips:
  26. Stop This Shortcut
  27. Choose from Menu
    Yes
  28. Ask for Input
    How many people will be splitting this bill?
  29. Get Variable
  30. Calculate
  31. Round Number
  32. Format Number
  33. Get Variable
  34. Calculate
  35. Format Number
  36. Get Variable
  37. Calculate
  38. Round Number
  39. Format Number
  40. Get Variable
  41. Calculate
  42. Format Number
  43. Get Variable
  44. Calculate
  45. Round Number
  46. Format Number
  47. Get Variable
  48. Calculate
  49. Format Number
  50. Get Variable
  51. Calculate
  52. Round Number
  53. Format Number
  54. Get Variable
  55. Calculate
  56. Format Number
  57. Show Alert
    Here are suggested tips:
  58. Stop This Shortcut

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#include 'actions/math'
#define color green
#define glyph dollarSign

const BillAmount = prompt("How much is the total bill?", "Number")
const FormattedBillAmount = formatNumber(0)
const Number = 0.1
const RoundedNumber10 = round(0)
const FormattedNumber10 = formatNumber(0)
const RoundedNumber15 = round(0)
const FormattedNumber15 = formatNumber(0)
const RoundedNumber18 = round(0)
const FormattedNumber18 = formatNumber(0)
const RoundedNumber20 = round(0)
const FormattedNumber20 = formatNumber(0)

menu "Are you splitting this bill?" {
item "No":
	alert("Your total bill is: ${FormattedBillAmount}\n(All tips are rounded up.)\n\nA 10% tip is: ${RoundedNumber10}\nYour new total is: ${FormattedNumber10}\n\nA 15% tip is: ${RoundedNumber15}\nYour new total is: {FormattedNumber15}\n\nAn 18% tip is: ${RoundedNumber18}\nYour new total is: ${FormattedNumber18}\n\nA 20% tip is: ${RoundedNumber20}\nYour new total is: ${FormattedNumber20}", "Here are suggested tips:")
	stop()
item "Yes":
	const AskForInputSplit = prompt("How many people will be splitting this bill?", "Number")
	// TODO: Get Variable not supported: Assign variable here to 'FormattedNumber10'.
	round(0)
	const FormattedNumberSplit10 = formatNumber(0, 2)
	// TODO: Get Variable not supported: Assign variable here to 'FormattedNumberSplit10'.
	const FormattedNumberSplit10V2 = formatNumber(0)
	// TODO: Get Variable not supported: Assign variable here to 'FormattedNumber15'.
	round(0)
	const FormattedNumberSplit15 = formatNumber(0)
	// TODO: Get Variable not supported: Assign variable here to 'FormattedNumberSplit15'.
	const FormattedNumberSplit15V2 = formatNumber(0)
	// TODO: Get Variable not supported: Assign variable here to 'FormattedNumber18'.
	round(0)
	const FormattedNumberSplit18 = formatNumber(0)
	// TODO: Get Variable not supported: Assign variable here to 'FormattedNumberSplit18'.
	const FormattedNumberSplit18V2 = formatNumber(0)
	// TODO: Get Variable not supported: Assign variable here to 'FormattedNumber20'.
	round(0)
	const FormattedNumberSplit20 = formatNumber(0)
	// TODO: Get Variable not supported: Assign variable here to 'FormattedNumberSplit20'.
	const FormattedNumberSplit20V2 = formatNumber(0)
}
alert("Your total bill is: ${FormattedBillAmount}\nYou will be splitting this bill {AskForInputSplit} ways.\n(All tips are rounded up.)\n\nA 10% tip is: ${RoundedNumber10}\nEach person pays: ${FormattedNumberSplit10}\nYour new total is: ${FormattedNumberSplit10V2}\n\nA 15% tip is: ${RoundedNumber15}\nEach person pays: ${FormattedNumberSplit15}\nYour new total is: ${FormattedNumberSplit15V2}\n\nAn 18% tip is: ${RoundedNumber18}\nEach person pays: ${FormattedNumberSplit18}\nYour new total is: ${FormattedNumberSplit18V2}\n\nA 20% tip is: ${RoundedNumber20}\nEach person pays: ${FormattedNumberSplit20}\nYour new total is: ${FormattedNumberSplit20V2}", "Here are suggested tips:")
stop()
Open in Cherri Playground Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

More by idelaware

See All

You Might Also Like

See All
Advertisement