팁 계산기
팁 금액을 계산하고 여러 명이 나눌 수 있습니다.
$
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.