🛠️ToolsShed

チップ計算

チップ額を計算し、複数人で割り勘します。

$
1

TipCalculator.resultsTitle

TipCalculator.tipAmount
$0.00
15%
TipCalculator.totalAmount
$0.00
TipCalculator.billPlusTip
TipCalculator.billSubtotal$0.00
TipCalculator.tipRow (15%)$0.00
TipCalculator.totalRow$0.00

チップ計算機は、レストラン、バー、ホテル、またはチップが期待されるサービスでいくらチップを出すかを素早く計算します。請求書の合計を入力し、チップの割合(またはカスタム金額の設定)を選択し、オプションで複数の人々で結果を分割すると、ツールはチップ額、1人あたりの合計、総額を表示します。

チップの慣習は国によって大きく異なります。アメリカでは、レストランサービスに対して15-20%が標準的ですが、多くのヨーロッパの国々はサービス料が請求書に含まれているか、5-10%の少額チップを期待します。

ツールを逆算に使用して、チップ込みの合計と人数を入力することで、各人が正確にいくら支払うべきかを確認することもできます。

よくある質問

コード実装

def calculate_tip(bill: float, tip_percent: float, num_people: int = 1) -> dict:
    """Calculate tip and split the bill."""
    tip_amount = bill * (tip_percent / 100)
    total = bill + tip_amount
    per_person = total / num_people
    tip_per_person = tip_amount / num_people
    return {
        "bill": bill,
        "tip_amount": tip_amount,
        "total": total,
        "per_person": per_person,
        "tip_per_person": tip_per_person,
        "tip_percent": tip_percent,
        "num_people": num_people,
    }

# Example: $85 bill, 18% tip, split 4 ways
result = calculate_tip(bill=85.00, tip_percent=18, num_people=4)
print(f"Bill:           ${result['bill']:.2f}")
print(f"Tip (18%):      ${result['tip_amount']:.2f}")
print(f"Total:          ${result['total']:.2f}")
print(f"Per Person:     ${result['per_person']:.2f}")
print(f"Tip Per Person: ${result['tip_per_person']:.2f}")

# Quick tip reference table
print("\nTip Reference:")
for pct in [10, 15, 18, 20, 25]:
    tip = bill_amount = 85 * pct / 100
    print(f"  {pct}%: ${tip:.2f} tip, ${85 + tip:.2f} total")

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.